Interface AnnotationManager

All Known Implementing Classes:
DefaultAnnotationManager

public interface AnnotationManager
The AnnotationManager API.
Author:
Manfred Riem ([email protected]), Arjan Tijms
  • Method Details

    • getAnnotations

      <T> List<AnnotationManager.AnnotationInfo<T>> getAnnotations(Class<T> annotationClass)
      Get the annotations.
      Type Parameters:
      T - the type.
      Parameters:
      annotationClass - the annotation class.
      Returns:
      the typed list of annotations.
    • getAnnotations

      List<AnnotationManager.AnnotationInfo<?>> getAnnotations(Class<?>... annotationClasses)
      Get the annotations.
      Parameters:
      annotationClasses - the annotation classes.
      Returns:
      the list of annotations.
    • getInstances

      <T> List<Class<T>> getInstances(Class<T> instanceClass)
      Get the instances.
      Type Parameters:
      T - the type.
      Parameters:
      instanceClass - the instance class.
      Returns:
      the typed list of instances.
    • getInstances

      List<Class<?>> getInstances(Class<?>... instanceClasses)
      Get the instances.
      Parameters:
      instanceClasses - the instance classes.
      Returns:
      the list of instances.
    • getAnnotatedClasses

      Set<Class<?>> getAnnotatedClasses()
      Returns the set of all annotated classes.
      Returns:
      the set of all annotated classes
    • getAnnotationsByTarget

      <T> List<AnnotationManager.AnnotationInfo<T>> getAnnotationsByTarget(Class<T> annotationClass, AnnotatedElement type)
      Get the annotation for the annotation class and annotated element type.
      Type Parameters:
      T - the type.
      Parameters:
      annotationClass - the annotation class.
      type - the annotated element type.
      Returns:
      the list of annotations.