Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.hibernate.bytecode
Interface BytecodeProvider  view BytecodeProvider download BytecodeProvider.java


public interface BytecodeProvider

Contract for providers of bytecode services to Hibernate.

Bytecode requirements break down into basically 4 areas

  1. proxy generation (both for runtime-lazy-loading and basic proxy generation) getProxyFactoryFactory() 55
  2. bean relection optimization getReflectionOptimizer(java.lang.Class, java.lang.String[], java.lang.String[], java.lang.Class[]) 55
  3. build-time instumentation (not covered by this contract)
  4. class-load intrumentation generateDynamicFieldInterceptionClassLoader(java.lang.ClassLoader, java.lang.String[], java.lang.String[]) 55 ; (currently only used in the test suite).


Method Summary
 java.lang.ClassLoader generateDynamicFieldInterceptionClassLoader(java.lang.ClassLoader parent, java.lang.String[] classpath, java.lang.String[] packages)
          Generate a ClassLoader capable of performing dynamic bytecode manipulation on classes as they are loaded for the purpose of field-level interception.
 ClassTransformer getEntityClassTransformer(java.lang.String[] packages, java.lang.String[] classes)
          Generate a ClassTransformer capable of performing dynamic bytecode manipulation on classes as they are loaded for the purpose of field-level interception.
 ProxyFactoryFactory getProxyFactoryFactory()
          Retrieve the specific factory for this provider capable of generating run-time proxies for lazy-loading purposes.
 ReflectionOptimizer getReflectionOptimizer(java.lang.Class clazz, java.lang.String[] getterNames, java.lang.String[] setterNames, java.lang.Class[] types)
          Retrieve the ReflectionOptimizer delegate for this provider capable of generating reflection optimization components.
 void releaseDynamicFieldInterceptionClassLoader(java.lang.ClassLoader classLoader)
           
 

Method Detail

getProxyFactoryFactory

public ProxyFactoryFactory getProxyFactoryFactory()
Retrieve the specific factory for this provider capable of generating run-time proxies for lazy-loading purposes.


getReflectionOptimizer

public ReflectionOptimizer getReflectionOptimizer(java.lang.Class clazz,
                                                  java.lang.String[] getterNames,
                                                  java.lang.String[] setterNames,
                                                  java.lang.Class[] types)
Retrieve the ReflectionOptimizer delegate for this provider capable of generating reflection optimization components.


generateDynamicFieldInterceptionClassLoader

public java.lang.ClassLoader generateDynamicFieldInterceptionClassLoader(java.lang.ClassLoader parent,
                                                                         java.lang.String[] classpath,
                                                                         java.lang.String[] packages)
Generate a ClassLoader capable of performing dynamic bytecode manipulation on classes as they are loaded for the purpose of field-level interception. The returned ClassLoader is used for run-time bytecode manipulation as opposed to the more common build-time manipulation, since here we get into SecurityManager issues and such.

Currently used only from the Hibernate test suite, although conceivably (SecurityManager concerns aside) could be used somehow in running systems.


getEntityClassTransformer

public ClassTransformer getEntityClassTransformer(java.lang.String[] packages,
                                                  java.lang.String[] classes)
Generate a ClassTransformer capable of performing dynamic bytecode manipulation on classes as they are loaded for the purpose of field-level interception. The returned ClassTransformer can be combined to an appropriate ClassLoader is used for run-time bytecode manipulation as opposed to the more common build-time manipulation, since here we get into SecurityManager issues and such.


releaseDynamicFieldInterceptionClassLoader

public void releaseDynamicFieldInterceptionClassLoader(java.lang.ClassLoader classLoader)