|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.instrument.classloading.SimpleLoadTimeWeaver
public class SimpleLoadTimeWeaver
LoadTimeWeaver
that builds and exposes a
SimpleInstrumentableClassLoader
.
Mainly intended for testing environments, where it is sufficient to
perform all class transformation on a newly created
ClassLoader
instance.
getInstrumentableClassLoader()
,
SimpleInstrumentableClassLoader
,
ReflectiveLoadTimeWeaver
Field Summary | |
---|---|
private SimpleInstrumentableClassLoader |
classLoader
|
Constructor Summary | |
---|---|
SimpleLoadTimeWeaver()
Create a new SimpleLoadTimeWeaver for the current context
ClassLoader . |
|
SimpleLoadTimeWeaver(SimpleInstrumentableClassLoader classLoader)
Create a new SimpleLoadTimeWeaver for the given
ClassLoader . |
Method Summary | |
---|---|
void |
addTransformer(java.lang.instrument.ClassFileTransformer transformer)
Add a ClassFileTransformer to be applied by this
LoadTimeWeaver . |
java.lang.ClassLoader |
getInstrumentableClassLoader()
Return a ClassLoader that supports instrumentation
through AspectJ-style load-time weaving based on user-defined
ClassFileTransformers . |
java.lang.ClassLoader |
getThrowawayClassLoader()
This implementation builds a SimpleThrowawayClassLoader . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final SimpleInstrumentableClassLoader classLoader
Constructor Detail |
---|
public SimpleLoadTimeWeaver()
SimpleLoadTimeWeaver
for the current context
ClassLoader
.
SimpleInstrumentableClassLoader
public SimpleLoadTimeWeaver(SimpleInstrumentableClassLoader classLoader)
SimpleLoadTimeWeaver
for the given
ClassLoader
.
classLoader
- the ClassLoader
to build a simple
instrumentable ClassLoader
on top ofMethod Detail |
---|
public void addTransformer(java.lang.instrument.ClassFileTransformer transformer)
LoadTimeWeaver
ClassFileTransformer
to be applied by this
LoadTimeWeaver
.
addTransformer
in interface LoadTimeWeaver
transformer
- the ClassFileTransformer
to addpublic java.lang.ClassLoader getInstrumentableClassLoader()
LoadTimeWeaver
ClassLoader
that supports instrumentation
through AspectJ-style load-time weaving based on user-defined
ClassFileTransformers
.
May be the current ClassLoader
, or a ClassLoader
created by this LoadTimeWeaver
instance.
getInstrumentableClassLoader
in interface LoadTimeWeaver
ClassLoader
which will expose
instrumented classes according to the registered transformerspublic java.lang.ClassLoader getThrowawayClassLoader()
SimpleThrowawayClassLoader
.
getThrowawayClassLoader
in interface LoadTimeWeaver
ClassLoader
; should return
a new instance for each call, with no existing state
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |