Interface AnnotationTarget

All Superinterfaces:
Element, NamedElement
All Known Subinterfaces:
AnnotationTypeDeclaration, AnnotationTypeElementDeclaration, ClassDeclaration, CompilationUnit, ConstructorDeclaration, Declaration, EnumerationTypeDeclaration, EnumerationValueDeclaration, ExecutableDeclaration, FieldDeclaration, InterfaceDeclaration, MemberDeclaration, MethodDeclaration, MutableAnnotationTarget, MutableAnnotationTypeDeclaration, MutableAnnotationTypeElementDeclaration, MutableClassDeclaration, MutableConstructorDeclaration, MutableDeclaration, MutableEnumerationTypeDeclaration, MutableEnumerationValueDeclaration, MutableExecutableDeclaration, MutableFieldDeclaration, MutableInterfaceDeclaration, MutableMemberDeclaration, MutableMethodDeclaration, MutableParameterDeclaration, MutableTypeDeclaration, MutableTypeParameterDeclaration, MutableTypeParameterDeclarator, ParameterDeclaration, TypeDeclaration, TypeParameterDeclaration, TypeParameterDeclarator

@Beta public interface AnnotationTarget extends NamedElement
An element that can be annotated
Author:
Sven Efftinge
  • Method Details

    • getAnnotations

      Iterable<? extends AnnotationReference> getAnnotations()
      Returns:
      the annotations this element is annotated with
    • findAnnotation

      AnnotationReference findAnnotation(Type annotationType)
      Parameters:
      annotationType -
      Returns:
      the annotation reference for the given type, or null if this element is not annotated with the given annotation type