java.lang.Object | |
↳ | org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver |
LoadTimeWeaver
relying on VM Instrumentation.
Start the JVM specifying the Java agent to be used, like as follows:
-javaagent:path/to/org.springframework.instrument.jar
where org.springframework.instrument.jar
is a JAR file containing
the InstrumentationSavingAgent
class, as shipped with Spring.
In Eclipse, for example, set the "Run configuration"'s JVM args to be of the form:
-javaagent:${project_loc}/lib/org.springframework.instrument.jar
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create a new InstrumentationLoadTimeWeaver for the default ClassLoader.
| |||||||||||
Create a new InstrumentationLoadTimeWeaver for the given ClassLoader.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Add a
ClassFileTransformer to be applied by this
LoadTimeWeaver . | |||||||||||
We have the ability to weave the current class loader when starting the
JVM in this way, so the instrumentable class loader will always be the
current loader.
| |||||||||||
This implementation always returns a
SimpleThrowawayClassLoader . | |||||||||||
Check whether an Instrumentation instance is available for the current VM.
| |||||||||||
Remove all registered transformers, in inverse order of registration.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
org.springframework.instrument.classloading.LoadTimeWeaver
|
Create a new InstrumentationLoadTimeWeaver for the default ClassLoader.
Create a new InstrumentationLoadTimeWeaver for the given ClassLoader.
classLoader | the ClassLoader that registered transformers are supposed to apply to |
---|
Add a ClassFileTransformer
to be applied by this
LoadTimeWeaver
.
transformer | the ClassFileTransformer to add
|
---|
We have the ability to weave the current class loader when starting the JVM in this way, so the instrumentable class loader will always be the current loader.
ClassLoader
which will expose
instrumented classes according to the registered transformers
This implementation always returns a SimpleThrowawayClassLoader
.
ClassLoader
; should return
a new instance for each call, with no existing state
Check whether an Instrumentation instance is available for the current VM.
Remove all registered transformers, in inverse order of registration.