public interface DCRContext
Modifier and Type | Method and Description |
---|---|
void |
add(Object target,
Constructor<?> constructor,
Recorder recorder)
Register a constructor for instrumentation.
|
void |
add(Object target,
Method method,
Weaver.TargetSource targetSource,
Recorder recorder)
Register a method for instrumentation.
|
void |
applyChanges()
Apply the changes queued with the
add methods. |
boolean |
isInstrumentable(Class<?> targetClass)
Test whether a class can be instrumented.
|
void add(Object target, Constructor<?> constructor, Recorder recorder) throws NonInstrumentableTypeException
target
- Target object.constructor
- The constructor.recorder
- The recorder to use.NonInstrumentableTypeException
- If the constructor belongs to a non-instrumentable type.void add(Object target, Method method, Weaver.TargetSource targetSource, Recorder recorder) throws NonInstrumentableTypeException
target
- Target object.method
- The method.targetSource
- The method parameter that identifies the target object..recorder
- The recorder to use.NonInstrumentableTypeException
- If the method belongs to a non-instrumentable type.boolean isInstrumentable(Class<?> targetClass)
targetClass
- The class to test.true
if the class can be instrumented.void applyChanges() throws WeavingException
add
methods.WeavingException
- If weaving failed.Copyright © 2000-2014. All Rights Reserved.