Package net.bytebuddy.dynamic.loading
Class ClassFilePostProcessor.ForClassFileTransformer
- java.lang.Object
-
- net.bytebuddy.dynamic.loading.ClassFilePostProcessor.ForClassFileTransformer
-
- All Implemented Interfaces:
ClassFilePostProcessor
- Enclosing interface:
- ClassFilePostProcessor
@Enhance public static class ClassFilePostProcessor.ForClassFileTransformer extends java.lang.Object implements ClassFilePostProcessor
A class file post processor that delegates to anClassFileTransformer.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.loading.ClassFilePostProcessor
ClassFilePostProcessor.ForClassFileTransformer, ClassFilePostProcessor.NoOp
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.instrument.ClassFileTransformerclassFileTransformerThe class file transformer to delegate to.private static java.lang.Class<?>UNLOADED_TYPEIndicates that a class is not currently loaded.
-
Constructor Summary
Constructors Constructor Description ForClassFileTransformer(java.lang.instrument.ClassFileTransformer classFileTransformer)Creates a new class file post processor for a class file transformer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]transform(java.lang.ClassLoader classLoader, java.lang.String name, java.security.ProtectionDomain protectionDomain, byte[] binaryRepresentation)Transforms a class file for a given class.
-
-
-
Method Detail
-
transform
public byte[] transform(java.lang.ClassLoader classLoader, java.lang.String name, java.security.ProtectionDomain protectionDomain, byte[] binaryRepresentation)Transforms a class file for a given class.- Specified by:
transformin interfaceClassFilePostProcessor- Parameters:
classLoader- The class loader which is used to load a class ornullif loaded by the bootstrap loader.name- The binary name of the transformed class.protectionDomain- The protection domain of the transformed class ornullif no protection domain is provided.binaryRepresentation- The binary representation of the class file.- Returns:
- The class file to use.
-
-