站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Hibernate 3.2.4 正式版 API 英文文档

AbstractClassTransformerImpl (Hibernate API Documentation) - Hibernate 3.2.4 正式版 API 英文文档


org.hibernate.bytecode
Class AbstractClassTransformerImpl

java.lang.Object
  extended byorg.hibernate.bytecode.AbstractClassTransformerImpl
All Implemented Interfaces:
ClassTransformer
Direct Known Subclasses:
CglibClassTransformer, JavassistClassTransformer

public abstract class AbstractClassTransformerImpl
extends Object
implements ClassTransformer

Author:
Emmanuel Bernard, Steve Ebersole

Field Summary
protected  ClassFilter classFilter
           
protected  FieldFilter fieldFilter
           
 
Constructor Summary
protected AbstractClassTransformerImpl(ClassFilter classFilter, FieldFilter fieldFilter)
           
 
Method Summary
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

classFilter

protected final ClassFilter classFilter

fieldFilter

protected final FieldFilter fieldFilter
Constructor Detail

AbstractClassTransformerImpl

protected AbstractClassTransformerImpl(ClassFilter classFilter,
                                       FieldFilter fieldFilter)
Method Detail

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 loader
className - The name of the class being transformed
classBeingRedefined - If an already loaded class is being redefined, then pass this as a parameter
protectionDomain - ProtectionDomain of the class being (re)-defined
classfileBuffer - 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)