| Modifier and Type | Class and Description |
|---|---|
static interface |
DCRWeaver.ClassFileTransformerFactory
Factory that generates
ClassFileTransformers which perform
the weaving. |
Weaver.TargetSource| Constructor and Description |
|---|
DCRWeaver(DCRWeaver.ClassFileTransformerFactory transformerFactory,
Instrumentation instrumentation)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
applyChanges()
Apply pending weaving that has been requested with
Weaver.weave(java.lang.reflect.Constructor<?>). |
String |
weave(Constructor<?> constructor)
Queue the given
constructor for weaving, and return a unique
identifier that can be used by the advice to refer to the constructor
pointcut. |
String |
weave(Method method,
Weaver.TargetSource targetSource)
Queue the given
method for weaving, and return a unique identifier
that can be used by the advice to refer to the method pointcut. |
public DCRWeaver(DCRWeaver.ClassFileTransformerFactory transformerFactory, Instrumentation instrumentation)
transformerFactory - Used to create the transformer.instrumentation - Access to the JVM instrumentation.public String weave(Constructor<?> constructor)
constructor for weaving, and return a unique
identifier that can be used by the advice to refer to the constructor
pointcut.
Once Weaver.weave(java.lang.reflect.Constructor<?>) has been called for a constructor, subsequent calls are
no-ops that will return the identifier generated for the original call.
The instrumentation will not be applied to the code until
Weaver.applyChanges() is called.
public String weave(Method method, Weaver.TargetSource targetSource) throws WeavingException
method for weaving, and return a unique identifier
that can be used by the advice to refer to the method pointcut.
Once Weaver.weave(java.lang.reflect.Constructor<?>) has been called for a method, subsequent calls are
no-ops that will return the identifier generated for the original call.
The instrumentation will not be applied to the code until
Weaver.applyChanges() is called.
weave in interface Weavermethod - The method.targetSource - Which object should be passed as the target to the advice.WeavingException - If the targetSource is incompatible with the
method.public void applyChanges()
throws WeavingException
Weaver.weave(java.lang.reflect.Constructor<?>).applyChanges in interface WeaverWeavingException - A problem occurred with the weaving.Copyright © 2000-2014. All Rights Reserved.