Class AnnotationAppender.Default

  • All Implemented Interfaces:
    AnnotationAppender
    Enclosing interface:
    AnnotationAppender

    public static class AnnotationAppender.Default
    extends java.lang.Object
    implements AnnotationAppender
    A default implementation for an annotation appender that writes annotations to a given byte consumer represented by an ASM AnnotationVisitor.
    • Constructor Detail

      • Default

        public Default​(AnnotationAppender.Target target)
        Creates a default annotation appender.
        Parameters:
        target - The target to which annotations are written to.
    • Method Detail

      • apply

        public static void apply​(org.objectweb.asm.AnnotationVisitor annotationVisitor,
                                 TypeDescription valueType,
                                 java.lang.String name,
                                 java.lang.Object value)
        Performs the writing of a given annotation value to an annotation visitor.
        Parameters:
        annotationVisitor - The annotation visitor the write process is to be applied on.
        valueType - The type of the annotation value.
        name - The name of the annotation type.
        value - The annotation's value.
      • append

        public AnnotationAppender append​(AnnotationDescription annotationDescription,
                                         AnnotationValueFilter annotationValueFilter)
        Description copied from interface: AnnotationAppender
        Writes the given annotation to the target that this appender represents.
        Specified by:
        append in interface AnnotationAppender
        Parameters:
        annotationDescription - The annotation to be written.
        annotationValueFilter - The annotation value filter to use.
        Returns:
        Usually this or any other annotation appender capable of writing another annotation to the specified target.
      • append

        public AnnotationAppender append​(AnnotationDescription annotationDescription,
                                         AnnotationValueFilter annotationValueFilter,
                                         int typeReference,
                                         java.lang.String typePath)
        Description copied from interface: AnnotationAppender
        Writes the given type annotation to the target that this appender represents.
        Specified by:
        append in interface AnnotationAppender
        Parameters:
        annotationDescription - The annotation to be written.
        annotationValueFilter - The annotation value filter to use.
        typeReference - The type variable's type reference.
        typePath - The type variable's type path.
        Returns:
        Usually this or any other annotation appender capable of writing another annotation to the specified target.