net.grinder.scriptengine.jython.instrumentation.dcr
Class Jython22Instrumenter

java.lang.Object
  extended by net.grinder.scriptengine.AbstractDCRInstrumenter
      extended by net.grinder.scriptengine.jython.instrumentation.dcr.Jython22Instrumenter
All Implemented Interfaces:
Instrumenter

public final class Jython22Instrumenter
extends AbstractDCRInstrumenter

DCR instrumenter for Jython 2.1, 2.2.

Author:
Philip Aston

Field Summary
 
Fields inherited from interface net.grinder.scriptengine.Instrumenter
ALL_INSTRUMENTATION
 
Constructor Summary
Jython22Instrumenter(DCRContext context)
          Constructor.
 
Method Summary
 String getDescription()
          Public description of the Instrumenter.
protected  boolean instrument(Object target, Recorder recorder, Test.InstrumentationFilter filter)
          Hook for sub-class to implement instrumentation.
protected  void instrumentPublicMethodsByName(Class<?> targetClass, Object target, String methodName, Weaver.TargetSource targetSource, Recorder recorder, boolean includeSuperClassMethods)
           
protected  void instrumentPublicMethodsByName(Object target, String methodName, Recorder recorder, boolean includeSuperClassMethods)
           
protected  void transform(Recorder recorder, org.python.core.PyClass target)
          
protected  void transform(Recorder recorder, org.python.core.PyFunction target)
          
protected  void transform(Recorder recorder, org.python.core.PyInstance target)
          
protected  void transform(Recorder recorder, org.python.core.PyMethod target)
          
protected  void transform(Recorder recorder, org.python.core.PyProxy target)
          
protected  void transform(Recorder recorder, org.python.core.PyReflectedConstructor target)
           
protected  void transform(Recorder recorder, org.python.core.PyReflectedFunction target, Object instance)
           
 
Methods inherited from class net.grinder.scriptengine.AbstractDCRInstrumenter
createInstrumentedProxy, getContext, instrument, instrument
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Jython22Instrumenter

public Jython22Instrumenter(DCRContext context)
Constructor.

Parameters:
context - The DCR context.
Method Detail

getDescription

public String getDescription()
Public description of the Instrumenter.

Returns:
The description; null for internal Instrumenters.

transform

protected void transform(Recorder recorder,
                         org.python.core.PyInstance target)
                  throws NonInstrumentableTypeException

Throws:
NonInstrumentableTypeException

transform

protected void transform(Recorder recorder,
                         org.python.core.PyFunction target)
                  throws NonInstrumentableTypeException

Throws:
NonInstrumentableTypeException

transform

protected void transform(Recorder recorder,
                         org.python.core.PyClass target)
                  throws NonInstrumentableTypeException

Throws:
NonInstrumentableTypeException

transform

protected void transform(Recorder recorder,
                         org.python.core.PyProxy target)
                  throws NonInstrumentableTypeException

Throws:
NonInstrumentableTypeException

transform

protected void transform(Recorder recorder,
                         org.python.core.PyMethod target)
                  throws NonInstrumentableTypeException

Throws:
NonInstrumentableTypeException

instrument

protected boolean instrument(Object target,
                             Recorder recorder,
                             Test.InstrumentationFilter filter)
                      throws NonInstrumentableTypeException
Description copied from class: AbstractDCRInstrumenter
Hook for sub-class to implement instrumentation.

Specified by:
instrument in class AbstractDCRInstrumenter
Parameters:
target - Target object.
recorder - Recorder.
filter - Selects the parts of target to instrument.
Returns:
true If this instrumenter successfully processed target, otherwise false.
Throws:
NonInstrumentableTypeException - If the target object is not of an instrumentable type.

transform

protected final void transform(Recorder recorder,
                               org.python.core.PyReflectedFunction target,
                               Object instance)
                        throws NonInstrumentableTypeException
Throws:
NonInstrumentableTypeException

transform

protected final void transform(Recorder recorder,
                               org.python.core.PyReflectedConstructor target)
                        throws NonInstrumentableTypeException
Throws:
NonInstrumentableTypeException

instrumentPublicMethodsByName

protected final void instrumentPublicMethodsByName(Object target,
                                                   String methodName,
                                                   Recorder recorder,
                                                   boolean includeSuperClassMethods)
                                            throws NonInstrumentableTypeException
Throws:
NonInstrumentableTypeException

instrumentPublicMethodsByName

protected final void instrumentPublicMethodsByName(Class<?> targetClass,
                                                   Object target,
                                                   String methodName,
                                                   Weaver.TargetSource targetSource,
                                                   Recorder recorder,
                                                   boolean includeSuperClassMethods)
                                            throws NonInstrumentableTypeException
Throws:
NonInstrumentableTypeException


Copyright © 2000-2013. All Rights Reserved.