public final class DCRContextImplementation extends Object implements DCRContext
AbstractDCRInstrumenter
implementations.| 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. |
static DCRContextImplementation |
create(org.slf4j.Logger logger)
Attempt to create a context.
|
boolean |
isInstrumentable(Class<?> targetClass)
Test whether a class can be instrumented.
|
public static DCRContextImplementation create(org.slf4j.Logger logger)
logger - A logger to complain to if problems are found.null if one could not be created.public void add(Object target, Constructor<?> constructor, Recorder recorder) throws NonInstrumentableTypeException
add in interface DCRContexttarget - Target object.constructor - The constructor.recorder - The recorder to use.NonInstrumentableTypeException - If the constructor belongs to a non-instrumentable type.public void add(Object target, Method method, Weaver.TargetSource targetSource, Recorder recorder) throws NonInstrumentableTypeException
add in interface DCRContexttarget - 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.public boolean isInstrumentable(Class<?> targetClass)
isInstrumentable in interface DCRContexttargetClass - The class to test.true if the class can be instrumented.public void applyChanges()
throws WeavingException
add methods.applyChanges in interface DCRContextWeavingException - If weaving failed.Copyright © 2000-2014. All Rights Reserved.