Interface MutableAnnotationTarget

All Superinterfaces:
AnnotationTarget, Element, MutableElement, MutableNamedElement, NamedElement
All Known Subinterfaces:
MutableAnnotationTypeDeclaration, MutableAnnotationTypeElementDeclaration, MutableClassDeclaration, MutableConstructorDeclaration, MutableDeclaration, MutableEnumerationTypeDeclaration, MutableEnumerationValueDeclaration, MutableExecutableDeclaration, MutableFieldDeclaration, MutableInterfaceDeclaration, MutableMemberDeclaration, MutableMethodDeclaration, MutableParameterDeclaration, MutableTypeDeclaration, MutableTypeParameterDeclaration, MutableTypeParameterDeclarator

@Beta public interface MutableAnnotationTarget extends MutableNamedElement, AnnotationTarget
Author:
Sven Efftinge
  • Method Details

    • addAnnotation

      AnnotationReference addAnnotation(AnnotationReference annotationReference)
      Annotate this element with the given annotation reference.
      Parameters:
      annotationReference - the annotation reference
      Returns:
      a new annotation reference
      Throws:
      IllegalArgumentException - if the given annotation reference is null
      Since:
      2.6
    • removeAnnotation

      boolean removeAnnotation(AnnotationReference annotationReference)
      Remove the given annotation reference from this element.
      Parameters:
      annotationReference - the annotation reference
      Returns:
      true if this element contained the specified annotation
      Since:
      2.6