Interface IInstrumentor

    • Method Detail

      • acceptToInstrument

        boolean acceptToInstrument​(JavaId _jid,
                                   javassist.CtBehavior _behavior,
                                   ClassVisitor _cv)
        Returns true of a given instrumentor accepts to instrument the given Java class, false otherwise.
        Parameters:
        _jid - a JavaId object.
        _behavior - a CtBehavior object.
        _cv - a ClassVisitor object.
        Returns:
        a boolean.
      • instrument

        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.
      • upladInformation

        void upladInformation​(AbstractGoal _exe,
                              int batchSize)
        Saves the information that has been collected by the instrumentor in the context of the given AbstractGoal.
        Parameters:
        _exe - a AbstractGoal object.
        batchSize - a int.
      • awaitUpload

        void awaitUpload()
        Make the current thread wait until the upload of the information finished.
      • getStatistics

        Map<String,​Long> getStatistics()
        Return instrumentor-specific statistics.
        Returns:
        a Map object.