Module org.glavo.classfile
Package org.glavo.classfile.attribute
Interface RuntimeVisibleAnnotationsAttribute
- All Superinterfaces:
Attribute<RuntimeVisibleAnnotationsAttribute>,ClassElement,ClassFileElement,FieldElement,MethodElement,WritableElement<RuntimeVisibleAnnotationsAttribute>
- All Known Implementing Classes:
BoundAttribute.BoundRuntimeVisibleAnnotationsAttribute,UnboundAttribute.UnboundRuntimeVisibleAnnotationsAttribute
public sealed interface RuntimeVisibleAnnotationsAttribute
extends Attribute<RuntimeVisibleAnnotationsAttribute>, ClassElement, MethodElement, FieldElement
permits BoundAttribute.BoundRuntimeVisibleAnnotationsAttribute, UnboundAttribute.UnboundRuntimeVisibleAnnotationsAttribute
Models the
RuntimeVisibleAnnotations attribute , which
can appear on classes, methods, and fields. Delivered as a
ClassElement, FieldElement, or
MethodElement when traversing the corresponding model type.
The attribute does not permit multiple instances in a given location. Subsequent occurrence of the attribute takes precedence during the attributed element build or transformation.
The attribute was introduced in the Java SE Platform version 5.0.
- Since:
- 22
-
Method Summary
Modifier and TypeMethodDescriptionReturns the runtime-visible annotations on this class, field, or method.of(List<Annotation> annotations) Returns aRuntimeVisibleAnnotationsattribute.of(Annotation... annotations) Returns aRuntimeVisibleAnnotationsattribute.Methods inherited from interface org.glavo.classfile.Attribute
attributeMapper, attributeNameMethods inherited from interface org.glavo.classfile.WritableElement
writeTo
-
Method Details
-
annotations
List<Annotation> annotations()Returns the runtime-visible annotations on this class, field, or method.- Returns:
- the runtime-visible annotations on this class, field, or method
-
of
Returns aRuntimeVisibleAnnotationsattribute.- Parameters:
annotations- the annotations- Returns:
- a
RuntimeVisibleAnnotationsattribute
-
of
Returns aRuntimeVisibleAnnotationsattribute.- Parameters:
annotations- the annotations- Returns:
- a
RuntimeVisibleAnnotationsattribute
-