public final class InstrumentationSavingAgent extends Object
Instrumentationinterface from the JVM for later use.
|Modifier and Type||Method and Description|
public static void premain(String agentArgs, Instrumentation inst)
public static void agentmain(String agentArgs, Instrumentation inst)
Instrumentationinterface exposed by the JVM. This method is required to dynamically load this Agent with the Attach API.
public static Instrumentation getInstrumentation()
Instrumentationinterface exposed by the JVM.
Note that this agent class will typically not be available in the classpath
unless the agent is actually specified on JVM startup. If you intend to do
conditional checking with respect to agent availability, consider using
instead - which will work without the agent class in the classpath as well.
Instrumentationinstance previously saved when the
agentmain(java.lang.String, java.lang.instrument.Instrumentation)methods was called by the JVM; will be
nullif this class was not used as Java agent when this JVM was started or it wasn't installed as agent using the Attach API.