Class EnhancerImpl

    • Field Detail

      • enhancementContext

        protected final org.hibernate.bytecode.enhance.internal.bytebuddy.ByteBuddyEnhancementContext enhancementContext
    • 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 interface Enhancer
        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