Interface ClassTransformer

    • Method Detail

      • transform

        byte[] transform​(@Nullable ClassLoader loader,
                         String className,
                         @Nullable Class<?> classBeingRedefined,
                         ProtectionDomain protectionDomain,
                         byte[] classfileBuffer)
                  throws TransformerException
        Invoked when a class is being loaded or redefined to add hooks for persistence bytecode manipulation.
        Specified by:
        transform in interface ClassTransformer
        loader - The defining class loader of the class being transformed. It may be null if using bootstrap loader
        className - The name of the class being transformed
        classBeingRedefined - If an already loaded class is being redefined, then pass this as a parameter
        protectionDomain - ProtectionDomain of the class being (re)-defined
        classfileBuffer - The input byte buffer in class file format
        A well-formed class file that can be loaded