All Downloads are FREE. Search and download functionalities are using the official Maven repository.

clouseau.Inst Maven / Gradle / Ivy

There is a newer version: 0.2.2
Show newest version
package clouseau;

import java.lang.instrument.Instrumentation;

public class Inst {
    private static volatile Instrumentation inst = null;

    public static boolean initialized() {
        return inst != null;
    }

    public static void premain(String args, Instrumentation inst) {
        if (Inst.inst != null) throw new AssertionError("premain called twice?");
        Inst.inst = inst;
    }

    public static Instrumentation instrumentation() {
        if (Inst.inst == null) throw new AssertionError("init failed; did you include -javaagent:clouseau.jar ?");
        return inst;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy