JLIClassTransformerpublic interface ClassTransformer
| Modifier and Type | Field | Description | 
|---|---|---|
static ClassTransformer | 
IDENTITY | 
 The identity transformation, which does not modify the class bytes at all. 
 | 
| Modifier and Type | Method | Description | 
|---|---|---|
static ClassTransformer | 
allOf(Collection<? extends ClassTransformer> transformers) | 
 Get a new transformer which applies all the transformations in the given collection. 
 | 
default ClassTransformer | 
andThen(ClassTransformer other) | 
 Get a new transformer which applies this transformation followed by another transformation. 
 | 
ByteBuffer | 
transform(ClassLoader loader,
         String className,
         ProtectionDomain protectionDomain,
         ByteBuffer classBytes) | 
 Transform the bytes of a class. 
 | 
static final ClassTransformer IDENTITY
ByteBuffer transform(ClassLoader loader, String className, ProtectionDomain protectionDomain, ByteBuffer classBytes) throws IllegalArgumentException
loader - the class loader of the class being transformedclassName - the internal name of the class being transformed (not null)protectionDomain - the protection domain of the class, if anyclassBytes - the class bytes being transformed (not null; may be a direct or heap buffer)IllegalArgumentException - if the class could not be transformed for some reasondefault ClassTransformer andThen(ClassTransformer other)
other - the other transformation (must not be null)null)static ClassTransformer allOf(Collection<? extends ClassTransformer> transformers)
transformers - the transformer collection (must not be null)null)Copyright © 2022 JBoss by Red Hat. All rights reserved.