Class SliceInstrumentor
- java.lang.Object
-
- org.eclipse.steady.java.monitor.AbstractInstrumentor
-
- org.eclipse.steady.java.monitor.slice.SliceInstrumentor
-
- All Implemented Interfaces:
IInstrumentor
public class SliceInstrumentor extends AbstractInstrumentor
Adds a configurable guard to all methods that have not been traced or found reachable.
-
-
Field Summary
-
Fields inherited from class org.eclipse.steady.java.monitor.AbstractInstrumentor
vulasConfiguration
-
-
Constructor Summary
Constructors Constructor Description SliceInstrumentor()Constructor for SliceInstrumentor.
-
Method Summary
All Methods Instance Methods Concrete 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 _batch_size)Saves the information that has been collected by the instrumentor in the context of the givenAbstractGoal.-
Methods inherited from class org.eclipse.steady.java.monitor.AbstractInstrumentor
injectStacktrace, injectUrlAndLoader
-
-
-
-
Method Detail
-
acceptToInstrument
public boolean acceptToInstrument(JavaId _jid, javassist.CtBehavior _behavior, ClassVisitor _cv)
Returns true of a given instrumentor accepts to instrument the given Java class, false otherwise. Returns true if the following two conditions hold, false otherwise: (1) The givenJavaIdis whitelisted or there is no whitelist (2) The givenJavaIdis NOT blacklisted or there is no blacklist. If there is neither a blacklist nor a whitelist, the method always returns false.- Parameters:
_jid- aJavaIdobject._behavior- aCtBehaviorobject._cv- aClassVisitorobject.- 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 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
public void upladInformation(AbstractGoal _exe, int _batch_size)
Saves the information that has been collected by the instrumentor in the context of the givenAbstractGoal. Implementation does not do anything.- Parameters:
_exe- aAbstractGoalobject._batch_size- a int.
-
awaitUpload
public void awaitUpload()
Make the current thread wait until the upload of the information finished. Implementation does not do anything.
-
-