Top Fields Constructors Methods
org.hibernate.jpa.internal.enhance

public Class EnhancingClassTransformerImpl

extends Object
implements ClassTransformer
Class Inheritance
All Implemented Interfaces
org.hibernate.bytecode.spi.ClassTransformer, javax.persistence.spi.ClassTransformer
Imports
java.lang.instrument.IllegalClassFormatException, java.security.ProtectionDomain, org.hibernate.bytecode.enhance.spi.EnhancementContext, .EnhancementContextWrapper, .Enhancer, org.hibernate.bytecode.spi.ClassTransformer, org.hibernate.cfg.Environment

Authors
Steve Ebersole, Luis Barreiro

Field Summary

Modifier and TypeField and Description
private final EnhancementContext

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public byte[]
transform(ClassLoader
the defining class loader of the class being transformed. It may be null if using bootstrap loader
loader
,
String
The name of the class being transformed
className
,
Class<?>
If an already loaded class is being redefined, then pass this as a parameter
classBeingRedefined
,
ProtectionDomain
ProtectionDomain of the class being (re)-defined
protectionDomain
,
byte[]
The input byte buffer in class file format
classfileBuffer
)

Implements org.hibernate.bytecode.spi.ClassTransformer.transform.

Invoked when a class is being loaded or redefined to add hooks for persistence bytecode manipulation.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

enhancementContextback to summary
private final EnhancementContext enhancementContext

Constructor Detail

EnhancingClassTransformerImplback to summary
public EnhancingClassTransformerImpl(EnhancementContext enhancementContext)

Method Detail

transformback to summary
public byte[] transform(ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws IllegalClassFormatException

Implements org.hibernate.bytecode.spi.ClassTransformer.transform.

Doc from org.hibernate.bytecode.spi.ClassTransformer.transform.

Invoked when a class is being loaded or redefined to add hooks for persistence bytecode manipulation.

Parameters
loader:ClassLoader

the defining class loader of the class being transformed. It may be null if using bootstrap loader

className:String

The name of the class being transformed

classBeingRedefined:Class<?>

If an already loaded class is being redefined, then pass this as a parameter

protectionDomain:ProtectionDomain

ProtectionDomain of the class being (re)-defined

classfileBuffer:byte[]

The input byte buffer in class file format

Returns:byte[]

A well-formed class file that can be loaded

Annotations
@Override
Exceptions
IllegalClassFormatException:

Doc from javax.persistence.spi.ClassTransformer.transform.

if the input does not represent a well-formed class file