Class TransformerUtils


  • public final class TransformerUtils
    extends Object
    Utilities for transforming the classes.
    • Method Detail

      • storeUnsafe

        public static boolean storeUnsafe​(String path,
                                          byte[] original,
                                          byte[] transformed,
                                          String className)
        Store the transformed bytes to allow us to debug them in enabled.
        Parameters:
        path - the path to store the bytes
        original - the unmodified bytes
        transformed - the modified bytes
        className - the class name being modified
        Returns:
        true if we stored the data
      • isExcludedClass

        public static boolean isExcludedClass​(Class<?> clazz)
        Is the class excluded from transformation.
        Parameters:
        clazz - the class
        Returns:
        true if we should not transform this class.
      • isExcludedClass

        public static boolean isExcludedClass​(String classname)
        Is the class excluded from transformation.
        Parameters:
        classname - the name of the class
        Returns:
        true if we should not transform this class.