Class TypeAttributeAppender.Explicit

java.lang.Object
net.bytebuddy.implementation.attribute.TypeAttributeAppender.Explicit
All Implemented Interfaces:
TypeAttributeAppender
Enclosing interface:
TypeAttributeAppender

@Enhance public static class TypeAttributeAppender.Explicit extends Object implements TypeAttributeAppender
An attribute appender that appends a single annotation to a given type. The visibility for the annotation will be inferred from the annotation's RetentionPolicy.
  • Field Details

  • Constructor Details

    • Explicit

      public Explicit(List<? extends AnnotationDescription> annotations)
      Creates a new annotation attribute appender for explicit annotation values.
      Parameters:
      annotations - The annotations to write to the given type.
  • Method Details

    • apply

      public void apply(org.objectweb.asm.ClassVisitor classVisitor, TypeDescription instrumentedType, AnnotationValueFilter annotationValueFilter)
      Applies this type attribute appender.
      Specified by:
      apply in interface TypeAttributeAppender
      Parameters:
      classVisitor - The class visitor to which the annotations of this visitor should be written to.
      instrumentedType - A description of the instrumented type that is target of the ongoing instrumentation.
      annotationValueFilter - The annotation value filter to apply when writing annotations.