BytecodeProvider (Hibernate JavaDocs)
Date: 2012-04-05

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hibernate.bytecode.spi
Interface BytecodeProvider

All Known Implementing Classes:
  BytecodeProviderImpl

    public interface BytecodeProvider

Contract for providers of bytecode services to Hibernate.

Bytecode requirements break down into basically 3 areas

1. proxy generation (both for runtime-lazy-loading and basic proxy generation) `getProxyFactoryFactory()`
2. bean reflection optimization `getReflectionOptimizer(java.lang.Class, java.lang.String[], java.lang.String[], java.lang.Class[])`
3. field-access instrumentation `getTransformer(org.hibernate.bytecode.buildtime.spi.ClassFilter, org.hibernate.bytecode.buildtime.spi.FieldFilter)`

Method Summary
`EntityInstrumentationMetadata` | `getEntityInstrumentationMetadata(Class entityClass)` Retrieve the interception metadata for the particular entity type.
`ProxyFactoryFactory` | `getProxyFactoryFactory()` Retrieve the specific factory for this provider capable of generating run-time proxies for lazy-loading purposes.
`ReflectionOptimizer` | `getReflectionOptimizer(Class clazz, String[] getterNames, String[] setterNames, Class[] types)` Retrieve the ReflectionOptimizer delegate for this provider capable of generating reflection optimization components.
`ClassTransformer` | `getTransformer(ClassFilter classFilter, FieldFilter fieldFilter)` Generate a ClassTransformer capable of performing bytecode manipulation.

Method Detail

### getProxyFactoryFactory

    ProxyFactoryFactory getProxyFactoryFactory()

  Retrieve the specific factory for this provider capable of generating run-time proxies for lazy-loading purposes.

  Returns:
    The provider specific factory.

### getReflectionOptimizer

    ReflectionOptimizer getReflectionOptimizer(Class clazz,
                                               String[] getterNames,
                                               String[] setterNames,
                                               Class[] types)

  Retrieve the ReflectionOptimizer delegate for this provider capable of generating reflection optimization components.

  Parameters:
    `clazz` - The class to be reflected upon.
    `getterNames` - Names of all property getters to be accessed via reflection.
    `setterNames` - Names of all property setters to be accessed via reflection.
    `types` - The types of all properties to be accessed.
  Returns:
    The reflection optimization delegate.

### getTransformer

    ClassTransformer getTransformer(ClassFilter classFilter,
                                    FieldFilter fieldFilter)

  Generate a ClassTransformer capable of performing bytecode manipulation.

  Parameters:
    `classFilter` - filter used to limit which classes are to be instrumented via this ClassTransformer.
    `fieldFilter` - filter used to limit which fields are to be instrumented via this ClassTransformer.
  Returns:
    The appropriate ClassTransformer.

### getEntityInstrumentationMetadata

    EntityInstrumentationMetadata getEntityInstrumentationMetadata(Class entityClass)

  Retrieve the interception metadata for the particular entity type.

  Parameters:
    `entityClass` - The entity class. Note: we pass class here instead of the usual "entity name" because only real classes can be instrumented.
  Returns:
    The metadata

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.