Package de.uzl.its.swat.instrument
Class Transformer
java.lang.Object
de.uzl.its.swat.instrument.Transformer
- All Implemented Interfaces:
ClassFileTransformer
This class runs all the different transformers.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addInstrumentedClass
(String cname, InternalTransformerType transformer) Adds a class to the list of instrumented classesstatic HashMap<String,
ArrayList<InternalTransformerType>> static PrintBox
static boolean
isInstrumented
(String cname) Checks if a class has already been instrumentedstatic boolean
static void
premain
(String agentArgs, Instrumentation inst) static void
retransform
(String cname) static boolean
shouldInstrument
(String cname) Checks if a class should be instrumented.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.instrument.ClassFileTransformer
transform, transform
-
Constructor Details
-
Transformer
public Transformer()
-
-
Method Details
-
retransform
-
isInstrumented
Checks if a class has already been instrumented- Parameters:
cname
- the name of the class- Returns:
- true if the class has been instrumented
-
addInstrumentedClass
Adds a class to the list of instrumented classes- Parameters:
cname
- the name of the classtransformer
- the transformer that instrumented the class
-
isLoaded
-
premain
-
shouldInstrument
Checks if a class should be instrumented. If the instrumentPackages are set, only classes in these packages will be instrumented. If the excludePackages are set, classes in these packages will not be instrumented.- Parameters:
cname
- the name of the class- Returns:
- true if the class should be instrumented, false otherwise
-
getInstrumentedClasses
-
getPrintBox
-