net.grinder.scriptengine
Class CompositeInstrumenter

java.lang.Object
  extended by net.grinder.scriptengine.CompositeInstrumenter
All Implemented Interfaces:
Instrumenter

public class CompositeInstrumenter
extends Object
implements Instrumenter

Composite instrumenter.

Author:
Philip Aston

Field Summary
 
Fields inherited from interface net.grinder.scriptengine.Instrumenter
ALL_INSTRUMENTATION
 
Constructor Summary
CompositeInstrumenter(Instrumenter... instrumenters)
          Constructor.
CompositeInstrumenter(List<Instrumenter> instrumenters)
          Constructor.
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositeInstrumenter

public CompositeInstrumenter(Instrumenter... instrumenters)
Constructor.

Parameters:
instrumenters - Ordered list of instrumenters.

CompositeInstrumenter

public CompositeInstrumenter(List<Instrumenter> instrumenters)
Constructor.

Parameters:
instrumenters - Ordered list of instrumenters.
Method Detail

createInstrumentedProxy

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

Specified by:
createInstrumentedProxy in interface Instrumenter
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

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

Specified by:
instrument in interface Instrumenter
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

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

Specified by:
instrument in interface Instrumenter
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

public String getDescription()
Public description of the Instrumenter.

Specified by:
getDescription in interface Instrumenter
Returns:
The description; null for internal Instrumenters.


Copyright © 2000-2013. All Rights Reserved.