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 java.lang.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'sRetentionPolicy
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.attribute.TypeAttributeAppender
TypeAttributeAppender.Compound, TypeAttributeAppender.Explicit, TypeAttributeAppender.ForInstrumentedType, TypeAttributeAppender.NoOp
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<? extends AnnotationDescription>
annotations
The annotations to write to the given type.
-
Constructor Summary
Constructors Constructor Description Explicit(java.util.List<? extends AnnotationDescription> annotations)
Creates a new annotation attribute appender for explicit annotation values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
apply(org.objectweb.asm.ClassVisitor classVisitor, TypeDescription instrumentedType, AnnotationValueFilter annotationValueFilter)
Applies this type attribute appender.
-
-
-
Field Detail
-
annotations
private final java.util.List<? extends AnnotationDescription> annotations
The annotations to write to the given type.
-
-
Constructor Detail
-
Explicit
public Explicit(java.util.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 Detail
-
apply
public void apply(org.objectweb.asm.ClassVisitor classVisitor, TypeDescription instrumentedType, AnnotationValueFilter annotationValueFilter)
Applies this type attribute appender.- Specified by:
apply
in interfaceTypeAttributeAppender
- 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.
-
-