Class SingleTraceInstrumentor

  • All Implemented Interfaces:
    IInstrumentor

    public class SingleTraceInstrumentor
    extends AbstractTraceInstrumentor
    Tracks whether a method has been invoked or not. The instrumentation code is only executed once.
    • Constructor Detail

      • SingleTraceInstrumentor

        public SingleTraceInstrumentor()
    • Method Detail

      • instrument

        public void instrument​(StringBuffer _code,
                               JavaId _jid,
                               javassist.CtBehavior _behavior,
                               ClassVisitor _cv)
                        throws javassist.CannotCompileException
        Appends Java source code to the given StringBuffer. After all IInstrumentors appended their respective code, the ensemble will be added to a Construct, which will then be compiled.
        Parameters:
        _code - a StringBuffer object.
        _jid - a JavaId object.
        _behavior - a CtBehavior object.
        _cv - a ClassVisitor object.
        Throws:
        javassist.CannotCompileException - if any.