Interface RuntimeVisibleAnnotationsAttribute

All Superinterfaces:
Attribute<RuntimeVisibleAnnotationsAttribute>, ClassElement, ClassfileElement, FieldElement, MethodElement, WritableElement<RuntimeVisibleAnnotationsAttribute>
All Known Implementing Classes:
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.
  • 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 a RuntimeVisibleAnnotations attribute.
      Parameters:
      annotations - the annotations
      Returns:
      a RuntimeVisibleAnnotations attribute
    • of

      static RuntimeVisibleAnnotationsAttribute of(Annotation... annotations)
      Returns a RuntimeVisibleAnnotations attribute.
      Parameters:
      annotations - the annotations
      Returns:
      a RuntimeVisibleAnnotations attribute