net.grinder.scriptengine
Interface Instrumenter

All Known Implementing Classes:
AbstractDCRInstrumenter, CompositeInstrumenter, Jython22Instrumenter, Jython25Instrumenter

public interface Instrumenter

A factory for instrumented proxies.

Author:
Philip Aston

Field Summary
static Test.InstrumentationFilter ALL_INSTRUMENTATION
          Instrumentation filter that matches everything.
 
Method Summary
 Object createInstrumentedProxy(Test test, Recorder recorder, Object target)
          Create a proxy object that wraps an target object for a test.
 String getDescription()
          Public description of the Instrumenter.
 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.
 

Field Detail

ALL_INSTRUMENTATION

static final Test.InstrumentationFilter ALL_INSTRUMENTATION
Instrumentation filter that matches everything.

Method Detail

createInstrumentedProxy

Object createInstrumentedProxy(Test test,
                               Recorder recorder,
                               Object target)
                               throws NotWrappableTypeException
Create a proxy object that wraps an target object for a test.

Parameters:
test - The test.
recorder - The proxy should use this to instrument the work.
target - Object to wrap.
Returns:
The instrumented proxy.
Throws:
NotWrappableTypeException - If the target object cannot be wrapped.

instrument

boolean instrument(Test test,
                   Recorder recorder,
                   Object target)
                   throws NonInstrumentableTypeException
Instrument a target object with a test.

Parameters:
test - The test.
recorder - Wire the instrumentation to this Recorder.
target - The object to instrument.
Returns:
true if instrumentation was added.
Throws:
NonInstrumentableTypeException - If the target object cannot be instrumented.

instrument

boolean instrument(Test test,
                   Recorder recorder,
                   Object target,
                   Test.InstrumentationFilter filter)
                   throws NonInstrumentableTypeException
Selectively instrument a target object with a test.

Parameters:
test - The test.
recorder - Wire the instrumentation to this Recorder.
target - The object to instrument.
filter - Selects the parts of target to instrument.
Returns:
true if instrumentation was added.
Throws:
NonInstrumentableTypeException - If the target object cannot be instrumented.

getDescription

String getDescription()
Public description of the Instrumenter.

Returns:
The description; null for internal Instrumenters.


Copyright © 2000-2013. All Rights Reserved.