Class Advice.OffsetMapping.ForSerializedValue.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.
      • typeDescription

        private final TypeDescription typeDescription
        The type description as which to treat the deserialized value.
      • deserialization

        private final StackManipulation deserialization
        The stack manipulation that loads the represented value.
    • Constructor Detail

      • Factory

        protected Factory​(java.lang.Class<T> annotationType,
                          TypeDescription typeDescription,
                          StackManipulation deserialization)
        Creates a factory for loading a deserialized value.
        Parameters:
        annotationType - The annotation type.
        typeDescription - The type description as which to treat the deserialized value.
        deserialization - The stack manipulation that loads the represented value.
    • Method Detail

      • of

        public static <S extends java.lang.annotation.Annotation> Advice.OffsetMapping.Factory<S> of​(java.lang.Class<S> annotationType,
                                                                                                     java.io.Serializable target,
                                                                                                     java.lang.Class<?> targetType)
        Creates a factory for an offset mapping that loads the provided value.
        Type Parameters:
        S - The annotation type the created factory binds.
        Parameters:
        annotationType - The annotation type to be bound.
        target - The instance representing the value to be deserialized.
        targetType - The target type as which to use the target value.
        Returns:
        An appropriate offset mapping factory.
      • 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.