Top Description Methods
org.hibernate.bytecode.enhance.spi

public Interface Enhancer

Known Direct Implementers
org.hibernate.bytecode.enhance.internal.bytebuddy.EnhancerImpl

Class responsible for performing enhancement.
Authors
Steve Ebersole, Jason Greene, Luis Barreiro

Method Summary

Modifier and TypeMethod and Description
public void
discoverTypes(String
The name of the class whose bytecode is being analyzed for type discovery.
className
,
byte[]
The class's original (pre-enhancement) byte code
originalBytes
)

Discovers types prior to enhancement.

public byte[]

Returns:

The enhanced bytecode. If the original bytes are not enhanced, null is returned.
enhance
(String
The name of the class whose bytecode is being enhanced.
className
,
byte[]
The class's original (pre-enhancement) byte code
originalBytes
)

Performs the enhancement.

Method Detail

discoverTypesback to summary
public void discoverTypes(String className, byte[] originalBytes) throws EnhancementException

Discovers types prior to enhancement. It is possible to invoke this method concurrently.

Parameters
className:String

The name of the class whose bytecode is being analyzed for type discovery.

originalBytes:byte[]

The class's original (pre-enhancement) byte code

Exceptions
EnhancementException:
Indicates a problem during type discovery
Since
6.3
enhanceback to summary
public byte[] enhance(String className, byte[] originalBytes) throws EnhancementException

Performs the enhancement. It is possible to invoke this method concurrently, but when doing so make sure no two enhancement tasks are invoked on the same class in parallel: the Enhancer implementations are not required to guard against this.

Parameters
className:String

The name of the class whose bytecode is being enhanced.

originalBytes:byte[]

The class's original (pre-enhancement) byte code

Returns:byte[]

The enhanced bytecode. If the original bytes are not enhanced, null is returned.

Exceptions
EnhancementException:
Indicates a problem performing the enhancement