java.lang.Object
cloud.piranha.webapp.impl.DefaultAnnotationManager
- All Implemented Interfaces:
AnnotationManager
public class DefaultAnnotationManager extends java.lang.Object implements AnnotationManager
The default AnnotationManager.
- Author:
- manfred
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DefaultAnnotationManager.DefaultAnnotationInfo<T>
Nested classes/interfaces inherited from interface cloud.piranha.webapp.api.AnnotationManager
AnnotationManager.AnnotationInfo<T>
-
Constructor Summary
Constructors Constructor Description DefaultAnnotationManager()
-
Method Summary
Modifier and Type Method Description DefaultAnnotationManager
addAnnotation(AnnotationManager.AnnotationInfo<?> annotationInfo)
DefaultAnnotationManager
addInstance(java.lang.Class<?> instanceClass, java.lang.Class<?> implementingClass)
java.util.Set<java.lang.Class<?>>
getAnnotatedClasses()
Get the annotated classes.java.util.List<AnnotationManager.AnnotationInfo<?>>
getAnnotations(java.lang.Class<?>... annotationClasses)
<T> java.util.List<AnnotationManager.AnnotationInfo<T>>
getAnnotations(java.lang.Class<T> annotationClass)
<T> java.util.List<AnnotationManager.AnnotationInfo<T>>
getAnnotationsByTarget(java.lang.Class<T> annotationClass, java.lang.reflect.AnnotatedElement type)
java.util.List<java.lang.Class<?>>
getInstances(java.lang.Class<?>... instanceClasses)
<T> java.util.List<java.lang.Class<T>>
getInstances(java.lang.Class<T> instanceClass)
-
Constructor Details
-
DefaultAnnotationManager
public DefaultAnnotationManager()
-
-
Method Details
-
getAnnotations
public java.util.List<AnnotationManager.AnnotationInfo<?>> getAnnotations(java.lang.Class<?>... annotationClasses)- Specified by:
getAnnotations
in interfaceAnnotationManager
-
getAnnotations
public <T> java.util.List<AnnotationManager.AnnotationInfo<T>> getAnnotations(java.lang.Class<T> annotationClass)- Specified by:
getAnnotations
in interfaceAnnotationManager
-
getInstances
public java.util.List<java.lang.Class<?>> getInstances(java.lang.Class<?>... instanceClasses)- Specified by:
getInstances
in interfaceAnnotationManager
-
getInstances
public <T> java.util.List<java.lang.Class<T>> getInstances(java.lang.Class<T> instanceClass)- Specified by:
getInstances
in interfaceAnnotationManager
-
addAnnotation
-
addInstance
public DefaultAnnotationManager addInstance(java.lang.Class<?> instanceClass, java.lang.Class<?> implementingClass) -
getAnnotatedClasses
public java.util.Set<java.lang.Class<?>> getAnnotatedClasses()Get the annotated classes.- Specified by:
getAnnotatedClasses
in interfaceAnnotationManager
- Returns:
- the annotated classes.
-
getAnnotationsByTarget
public <T> java.util.List<AnnotationManager.AnnotationInfo<T>> getAnnotationsByTarget(java.lang.Class<T> annotationClass, java.lang.reflect.AnnotatedElement type)- Specified by:
getAnnotationsByTarget
in interfaceAnnotationManager
-