Class EnhancerImpl
- java.lang.Object
-
- org.hibernate.bytecode.enhance.internal.bytebuddy.EnhancerImpl
-
-
Field Summary
Fields Modifier and Type Field Description protected org.hibernate.bytecode.enhance.internal.bytebuddy.ByteBuddyEnhancementContext
enhancementContext
-
Constructor Summary
Constructors Constructor Description EnhancerImpl(EnhancementContext enhancementContext, ByteBuddyState byteBuddyState)
Constructs the Enhancer, using the given context.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
enhance(String className, byte[] originalBytes)
Performs the enhancement.
-
-
-
Constructor Detail
-
EnhancerImpl
public EnhancerImpl(EnhancementContext enhancementContext, ByteBuddyState byteBuddyState)
Constructs the Enhancer, using the given context.- Parameters:
enhancementContext
- Describes the context in which enhancement will occur so as to give access to contextual/environmental information.byteBuddyState
- refers to the ByteBuddy instance to use
-
-
Method Detail
-
enhance
public byte[] enhance(String className, byte[] originalBytes) throws EnhancementException
Performs the enhancement.- Specified by:
enhance
in interfaceEnhancer
- Parameters:
className
- The name of the class whose bytecode is being enhanced.originalBytes
- The class's original (pre-enhancement) byte code- Returns:
- The enhanced bytecode. Could be the same as the original bytecode if the original was already enhanced or we could not enhance it for some reason.
- Throws:
EnhancementException
- Indicates a problem performing the enhancement
-
-