|
|||||||||
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
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(ClassFileTransformer transformer)
Add a ClassFileTransformer to be applied by this
LoadTimeWeaver . |
ClassLoader |
getInstrumentableClassLoader()
Return a ClassLoader that supports instrumentation
through AspectJ-style load-time weaving based on user-defined
ClassFileTransformers . |
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 |
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(ClassFileTransformer transformer)
LoadTimeWeaver
ClassFileTransformer
to be applied by this
LoadTimeWeaver
.
addTransformer
in interface LoadTimeWeaver
transformer
- the ClassFileTransformer
to addpublic 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 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 |