org.hibernate.bytecode.spi
Class AbstractClassTransformerImpl
java.lang.Object
org.hibernate.bytecode.spi.AbstractClassTransformerImpl
- All Implemented Interfaces:
- ClassTransformer
- Direct Known Subclasses:
- JavassistClassTransformer
public abstract class AbstractClassTransformerImpl
- extends Object
- implements ClassTransformer
Basic implementation of the ClassTransformer
contract.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
classFilter
protected final ClassFilter classFilter
fieldFilter
protected final FieldFilter fieldFilter
AbstractClassTransformerImpl
protected AbstractClassTransformerImpl(ClassFilter classFilter,
FieldFilter fieldFilter)
transform
public byte[] transform(ClassLoader loader,
String className,
Class classBeingRedefined,
ProtectionDomain protectionDomain,
byte[] classfileBuffer)
- Description copied from interface:
ClassTransformer
- Invoked when a class is being loaded or redefined to add hooks for persistence bytecode manipulation
- Specified by:
transform
in interface ClassTransformer
- Parameters:
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 format
- Returns:
- A well-formed class file that can be loaded
doTransform
protected abstract byte[] doTransform(ClassLoader loader,
String className,
Class classBeingRedefined,
ProtectionDomain protectionDomain,
byte[] classfileBuffer)
Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.