Class BytecodeProviderImpl

  • All Implemented Interfaces:
    Serializable, BytecodeProvider, Service

    public final class BytecodeProviderImpl
    extends Object
    implements BytecodeProvider
    This BytecodeProvider represents the "no-op" enhancer; mostly useful as an optimisation when not needing any byte code optimisation applied, for example when the entities have been enhanced at compile time. Choosing this BytecodeProvider allows to exclude the bytecode enhancement libraries from the runtime classpath.
    Since:
    5.4
    See Also:
    Serialized Form
    • Constructor Detail

      • BytecodeProviderImpl

        public BytecodeProviderImpl()
    • Method Detail

      • getReflectionOptimizer

        public ReflectionOptimizer getReflectionOptimizer​(Class clazz,
                                                          String[] getterNames,
                                                          String[] setterNames,
                                                          Class[] types)
        Description copied from interface: BytecodeProvider
        Retrieve the ReflectionOptimizer delegate for this provider capable of generating reflection optimization components.
        Specified by:
        getReflectionOptimizer in interface BytecodeProvider
        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.
      • getReflectionOptimizer

        public @Nullable ReflectionOptimizer getReflectionOptimizer​(Class<?> clazz,
                                                                    Map<String,​PropertyAccess> propertyAccessMap)
        Description copied from interface: BytecodeProvider
        Retrieve the ReflectionOptimizer delegate for this provider capable of generating reflection optimization components.
        Specified by:
        getReflectionOptimizer in interface BytecodeProvider
        Parameters:
        clazz - The class to be reflected upon.
        propertyAccessMap - The ordered property access map
        Returns:
        The reflection optimization delegate.
      • getEnhancer

        public @Nullable Enhancer getEnhancer​(EnhancementContext enhancementContext)
        Description copied from interface: BytecodeProvider
        Returns a byte code enhancer that implements the enhancements described in the supplied enhancement context.
        Specified by:
        getEnhancer in interface BytecodeProvider
        Parameters:
        enhancementContext - The enhancement context that describes the enhancements to apply.
        Returns:
        An enhancer to perform byte code manipulations.