Class StackTraceInstrumentor

  • All Implemented Interfaces:
    IInstrumentor

    public class StackTraceInstrumentor
    extends AbstractTraceInstrumentor
    Tracks how many times a construct has been invoked. Downloads the list of relevant bugs from the backend and collects the stack trace for all their change list elements. Stack traces collected will be transformed into call paths that are again uploaded to the backend.
    • Constructor Detail

      • StackTraceInstrumentor

        public StackTraceInstrumentor()

        Constructor for StackTraceInstrumentor.

    • Method Detail

      • isStacktraceRequestedFor

        public boolean isStacktraceRequestedFor​(ConstructId _construct)

        isStacktraceRequestedFor.

        Parameters:
        _construct - a ConstructId object.
        Returns:
        a boolean.
      • 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.