Class Transformer

java.lang.Object
de.uzl.its.swat.instrument.Transformer
All Implemented Interfaces:
ClassFileTransformer

public abstract class Transformer extends Object implements ClassFileTransformer
This class runs all the different transformers.
  • Constructor Details

    • Transformer

      public Transformer()
  • Method Details

    • retransform

      public static void retransform(String cname)
    • isInstrumented

      public static boolean isInstrumented(String cname)
      Checks if a class has already been instrumented
      Parameters:
      cname - the name of the class
      Returns:
      true if the class has been instrumented
    • addInstrumentedClass

      public static void addInstrumentedClass(String cname, InternalTransformerType transformer)
      Adds a class to the list of instrumented classes
      Parameters:
      cname - the name of the class
      transformer - the transformer that instrumented the class
    • isLoaded

      public static boolean isLoaded(String cname)
    • premain

      public static void premain(String agentArgs, Instrumentation inst)
    • shouldInstrument

      public static boolean shouldInstrument(String cname)
      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

      public static HashMap<String,ArrayList<InternalTransformerType>> getInstrumentedClasses()
    • getPrintBox

      public static PrintBox getPrintBox()