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)
Delegate the transformation call from
transform(java.lang.ClassLoader, java.lang.String, java.lang.Class, java.security.ProtectionDomain, byte[]) |
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)
transform(java.lang.ClassLoader, java.lang.String, java.lang.Class, java.security.ProtectionDomain, byte[])
loader
- The class loader to useclassName
- The name of the class to transformclassBeingRedefined
- If an already loaded class is being redefined, then pass this as a parameterprotectionDomain
- The protection domain of the class being (re)definedclassfileBuffer
- The bytes of the class file.Copyright © 2001-2017 Red Hat, Inc. All Rights Reserved.