public abstract class AbstractDCRInstrumenter extends Object implements Instrumenter
ALL_INSTRUMENTATION
Modifier | Constructor and Description |
---|---|
protected |
AbstractDCRInstrumenter(DCRContext context)
Constructor for AbstractDCRInstrumenter.
|
Modifier and Type | Method and Description |
---|---|
Object |
createInstrumentedProxy(Test test,
Recorder recorder,
Object target)
Create a proxy object that wraps an target object for a test.
|
protected DCRContext |
getContext()
Provide subclasses convenient access to the DCR context.
|
protected abstract boolean |
instrument(Object target,
Recorder recorder,
Test.InstrumentationFilter filter)
Hook for sub-class to implement instrumentation.
|
boolean |
instrument(Test test,
Recorder recorder,
Object target)
Instrument a target object with a test.
|
boolean |
instrument(Test test,
Recorder recorder,
Object target,
Test.InstrumentationFilter filter)
Selectively instrument a target object with a test.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDescription
protected AbstractDCRInstrumenter(DCRContext context)
context
- The DCR context.protected final DCRContext getContext()
public final Object createInstrumentedProxy(Test test, Recorder recorder, Object target) throws NotWrappableTypeException
createInstrumentedProxy
in interface Instrumenter
test
- The test.recorder
- The proxy should use this to instrument the work.target
- Object to wrap.NotWrappableTypeException
- If the target object cannot be wrapped.public boolean instrument(Test test, Recorder recorder, Object target) throws NonInstrumentableTypeException
instrument
in interface Instrumenter
test
- The test.recorder
- Wire the instrumentation to this Recorder
.target
- The object to instrument.true
if instrumentation was added.NonInstrumentableTypeException
- If the target object cannot be instrumented.public final boolean instrument(Test test, Recorder recorder, Object target, Test.InstrumentationFilter filter) throws NonInstrumentableTypeException
instrument
in interface Instrumenter
test
- The test.recorder
- Wire the instrumentation to this Recorder
.target
- The object to instrument.filter
- Selects the parts of target
to instrument.true
if instrumentation was added.NonInstrumentableTypeException
- If the target object cannot be instrumented.protected abstract boolean instrument(Object target, Recorder recorder, Test.InstrumentationFilter filter) throws NonInstrumentableTypeException
target
- Target object.recorder
- Recorder.filter
- Selects the parts of target
to instrument.true
If this instrumenter successfully processed target
, otherwise false
.NonInstrumentableTypeException
- If the target object is not of an instrumentable type.Copyright © 2000-2014. All Rights Reserved.