Class Advice.OffsetMapping.ForStackManipulation.Factory<T extends java.lang.annotation.Annotation>

    • Field Detail

      • annotationType

        private final java.lang.Class<T extends java.lang.annotation.Annotation> annotationType
        The annotation type.
      • stackManipulation

        private final StackManipulation stackManipulation
        The stack manipulation that loads the bound value.
    • Constructor Detail

      • Factory

        public Factory​(java.lang.Class<T> annotationType,
                       TypeDescription typeDescription)
        Creates a new factory for binding a type description.
        Parameters:
        annotationType - The annotation type.
        typeDescription - The type to bind.
      • Factory

        public Factory​(java.lang.Class<T> annotationType,
                       EnumerationDescription enumerationDescription)
        Creates a new factory for binding an enumeration.
        Parameters:
        annotationType - The annotation type.
        enumerationDescription - The enumeration to bind.
      • Factory

        public Factory​(java.lang.Class<T> annotationType,
                       StackManipulation stackManipulation,
                       TypeDescription.Generic typeDescription)
        Creates a new factory for binding a stack manipulation.
        Parameters:
        annotationType - The annotation type.
        stackManipulation - The stack manipulation that loads the bound value.
        typeDescription - The type of the loaded value.
    • Method Detail

      • of

        public static <S extends java.lang.annotation.Annotation> Advice.OffsetMapping.Factory<S> of​(java.lang.Class<S> annotationType,
                                                                                                     java.lang.Object value)
        Creates a binding for a fixed String, a primitive value or a method handle or type.
        Type Parameters:
        S - The annotation type.
        Parameters:
        annotationType - The annotation type.
        value - The primitive (wrapper) value, String value, method handle or type to bind.
        Returns:
        A factory for creating an offset mapping that binds the supplied value.
      • getAnnotationType

        public java.lang.Class<T> getAnnotationType()
        Returns the annotation type of this factory.
        Specified by:
        getAnnotationType in interface Advice.OffsetMapping.Factory<T extends java.lang.annotation.Annotation>
        Returns:
        The factory's annotation type.