public abstract class AbstractClassTransformerImpl extends Object implements ClassTransformer
ClassTransformer
contract.Modifier and Type | Field and Description |
---|---|
protected ClassFilter |
classFilter |
protected FieldFilter |
fieldFilter |
Modifier | Constructor and Description |
---|---|
protected |
AbstractClassTransformerImpl(ClassFilter classFilter,
FieldFilter fieldFilter) |
Modifier and Type | Method and Description |
---|---|
protected abstract byte[] |
doTransform(ClassLoader loader,
String className,
Class classBeingRedefined,
ProtectionDomain protectionDomain,
byte[] classfileBuffer) |
byte[] |
transform(ClassLoader loader,
String className,
Class classBeingRedefined,
ProtectionDomain protectionDomain,
byte[] classfileBuffer)
Invoked when a class is being loaded or redefined to add hooks for persistence bytecode manipulation
|
protected final ClassFilter classFilter
protected final FieldFilter fieldFilter
protected AbstractClassTransformerImpl(ClassFilter classFilter, FieldFilter fieldFilter)
public byte[] transform(ClassLoader loader, String className, Class classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer)
ClassTransformer
transform
in interface ClassTransformer
loader
- the defining class loaderof the class being transformed. It may be null if using bootstrap loaderclassName
- The name of the class being transformedclassBeingRedefined
- If an already loaded class is being redefined, then pass this as a parameterprotectionDomain
- ProtectionDomain of the class being (re)-definedclassfileBuffer
- The input byte buffer in class file formatprotected abstract byte[] doTransform(ClassLoader loader, String className, Class classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer)
Copyright © 2018 JBoss by Red Hat. All rights reserved.