Package org.eclipse.steady.java.monitor
Interface IInstrumentor
-
- All Known Implementing Classes:
AbstractInstrumentor,AbstractTraceInstrumentor,PrintlnInstrumentor,SingleStackTraceInstrumentor,SingleTraceInstrumentor,SliceInstrumentor,StackTraceInstrumentor,TouchPointInstrumentor
public interface IInstrumentorTo be implemented by every instrumentor.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanacceptToInstrument(JavaId _jid, javassist.CtBehavior _behavior, ClassVisitor _cv)Returns true of a given instrumentor accepts to instrument the given Java class, false otherwise.voidawaitUpload()Make the current thread wait until the upload of the information finished.Map<String,Long>getStatistics()Return instrumentor-specific statistics.voidinstrument(StringBuffer _code, JavaId _jid, javassist.CtBehavior _behavior, ClassVisitor _cv)Appends Java source code to the givenStringBuffer.voidupladInformation(AbstractGoal _exe, int batchSize)Saves the information that has been collected by the instrumentor in the context of the givenAbstractGoal.
-
-
-
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- aJavaIdobject._behavior- aCtBehaviorobject._cv- aClassVisitorobject.- Returns:
- a boolean.
-
instrument
void instrument(StringBuffer _code, JavaId _jid, javassist.CtBehavior _behavior, ClassVisitor _cv) throws javassist.CannotCompileException
Appends Java source code to the givenStringBuffer. After allIInstrumentors appended their respective code, the ensemble will be added to aConstruct, which will then be compiled.- Parameters:
_code- aStringBufferobject._jid- aJavaIdobject._behavior- aCtBehaviorobject._cv- aClassVisitorobject.- 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 givenAbstractGoal.- Parameters:
_exe- aAbstractGoalobject.batchSize- a int.
-
awaitUpload
void awaitUpload()
Make the current thread wait until the upload of the information finished.
-
-