类 InstrumentationSavingAgent
- java.lang.Object
- org.springframework.instrument.InstrumentationSavingAgent
public class InstrumentationSavingAgent extends Object
Java agent that saves theInstrumentationinterface from the JVM for later use.- 从以下版本开始:
- 2.0
- 作者:
- Rod Johnson, Juergen Hoeller
- 另请参阅:
InstrumentationLoadTimeWeaver
构造器概要
构造器 构造器 说明 InstrumentationSavingAgent()
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static voidagentmain(String agentArgs, Instrumentation inst)Save theInstrumentationinterface exposed by the JVM.static InstrumentationgetInstrumentation()Return theInstrumentationinterface exposed by the JVM.static voidpremain(String agentArgs, Instrumentation inst)Save theInstrumentationinterface exposed by the JVM.
构造器详细资料
InstrumentationSavingAgent
public InstrumentationSavingAgent()
方法详细资料
premain
public static void premain(String agentArgs, Instrumentation inst)
Save theInstrumentationinterface exposed by the JVM.
agentmain
public static void agentmain(String agentArgs, Instrumentation inst)
Save theInstrumentationinterface exposed by the JVM. This method is required to dynamically load this Agent with the Attach API.
getInstrumentation
public static Instrumentation getInstrumentation()
Return theInstrumentationinterface 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
InstrumentationLoadTimeWeaver.getInstrumentation()instead - which will work without the agent class in the classpath as well.- 返回:
- the
Instrumentationinstance previously saved when thepremain(java.lang.String, java.lang.instrument.Instrumentation)oragentmain(java.lang.String, java.lang.instrument.Instrumentation)methods was called by the JVM; will benullif this class was not used as Java agent when this JVM was started or it wasn't installed as agent using the Attach API. - 另请参阅:
InstrumentationLoadTimeWeaver.getInstrumentation()