- All Known Implementing Classes:
DefaultAnnotationManager
public interface AnnotationManager
The AnnotationManager API.
- Author:
- Manfred Riem ([email protected]), Arjan Tijms
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
AnnotationManager.AnnotationInfo<T>
The annotation information. -
Method Summary
Modifier and Type Method Description java.util.Set<java.lang.Class<?>>
getAnnotatedClasses()
Get the set of all annotated classes.java.util.List<AnnotationManager.AnnotationInfo<?>>
getAnnotations(java.lang.Class<?>... annotationClasses)
Get the annotations.<T> java.util.List<AnnotationManager.AnnotationInfo<T>>
getAnnotations(java.lang.Class<T> annotationClass)
Get the annotations.<T> java.util.List<AnnotationManager.AnnotationInfo<T>>
getAnnotationsByTarget(java.lang.Class<T> annotationClass, java.lang.reflect.AnnotatedElement type)
Get the annotation for the annotation class and annotated element type.java.util.List<java.lang.Class<?>>
getInstances(java.lang.Class<?>... instanceClasses)
Get the instances.<T> java.util.List<java.lang.Class<T>>
getInstances(java.lang.Class<T> instanceClass)
Get the instances.
-
Method Details
-
getAnnotations
<T> java.util.List<AnnotationManager.AnnotationInfo<T>> getAnnotations(java.lang.Class<T> annotationClass)Get the annotations.- Type Parameters:
T
- the type.- Parameters:
annotationClass
- the annotation class.- Returns:
- the typed list of annotations.
-
getAnnotations
java.util.List<AnnotationManager.AnnotationInfo<?>> getAnnotations(java.lang.Class<?>... annotationClasses)Get the annotations.- Parameters:
annotationClasses
- the annotation classes.- Returns:
- the list of annotations.
-
getInstances
<T> java.util.List<java.lang.Class<T>> getInstances(java.lang.Class<T> instanceClass)Get the instances.- Type Parameters:
T
- the type.- Parameters:
instanceClass
- the instance class.- Returns:
- the typed list of instances.
-
getInstances
java.util.List<java.lang.Class<?>> getInstances(java.lang.Class<?>... instanceClasses)Get the instances.- Parameters:
instanceClasses
- the instance classes.- Returns:
- the list of instances.
-
getAnnotatedClasses
java.util.Set<java.lang.Class<?>> getAnnotatedClasses()Get the set of all annotated classes.- Returns:
- the set of all annotated classes
-
getAnnotationsByTarget
<T> java.util.List<AnnotationManager.AnnotationInfo<T>> getAnnotationsByTarget(java.lang.Class<T> annotationClass, java.lang.reflect.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.
-