- All Known Implementing Classes:
DefaultAnnotationManager
,InternalAnnotationScanAnnotationManager
public interface AnnotationManager
The AnnotationManager API.
- Author:
- Manfred Riem ([email protected]), Arjan Tijms
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAnnotatedClass
(Class<? extends Annotation> annotationClass, Class<?> clazz) Add an annotated class.void
addAnnotation
(AnnotationInfo<?> annotationInfo) Add the annotation.void
addInstance
(Class<?> instanceClass, Class<?> implementingClass) Add an instance.getAnnotatedClass
(Class<? extends Annotation> annotationClass) Get the annotated classes.getAnnotatedClasses
(Class<?>[] annotationClasses) Get annotated classes.List<AnnotationInfo<?>>
getAnnotations
(Class<?>... annotationClasses) Get the annotations.<T> List<AnnotationInfo<T>>
getAnnotations
(Class<T> annotationClass) Get the annotations.<T> List<AnnotationInfo<T>>
getAnnotationsByTarget
(Class<T> annotationClass, AnnotatedElement type) Get the annotation for the annotation class and annotated element type.getInstances
(Class<?>... instanceClasses) Get the instances.getInstances
(Class<T> instanceClass) Get the instances.
-
Method Details
-
addAnnotation
Add the annotation.- Parameters:
annotationInfo
- the annotation info.
-
addInstance
Add an instance.- Parameters:
instanceClass
- the instance class.implementingClass
- the implementing class.
-
getAnnotations
Get the annotations.- Type Parameters:
T
- the type.- Parameters:
annotationClass
- the annotation class.- Returns:
- the typed list of annotations.
-
getAnnotations
Get the annotations.- Parameters:
annotationClasses
- the annotation classes.- Returns:
- the list of annotations.
-
getInstances
Get the instances.- Type Parameters:
T
- the type.- Parameters:
instanceClass
- the instance class.- Returns:
- the typed list of instances.
-
getInstances
Get the instances.- Parameters:
instanceClasses
- the instance classes.- Returns:
- the list of instances.
-
getAnnotationsByTarget
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.
-
addAnnotatedClass
Add an annotated class.- Parameters:
annotationClass
- the annotation class on the annotated class.clazz
- the annotated class.
-
getAnnotatedClass
Get the annotated classes.- Parameters:
annotationClass
- the annotation to inspect for.- Returns:
- the classes annotated with the given annotation (if any).
-
getAnnotatedClasses
Get annotated classes.- Parameters:
annotationClasses
- the annotation classes to inspect for.- Returns:
- the classes annotated with the given annotations (if any).
-