| Modifier and Type | Field and Description |
|---|---|
| private final Map | |
| private final Map |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public synchronized void | addAnnotation(AnnotatedElement element, Annotation annotation)
Add an annotation to element, which must be a Class, Method, or Constructor. |
| public synchronized void | addInheritedAnnotations(final Class<?> cls, final Class<?> ancestor)
Add all annotations on cls (including inherited annotations and its methods (including overridden methods in super classes and interfaces) to super (which must be a super class or interface of cls). |
| public <A extends Annotation> A | |
| public Map | Returns: Map from annotation class to annotation value.Class to analyze. cls)Return a map of all annotations defined on cls and its super classes and interfaces in ClassAnalyzer order. |
| private Map | |
| public Map | Returns: A map from annotation class to annotationThe method to analyze method)Return a map of all annotations defined in method and its overriden methods in the inheritance order of the ClassAnalyzer for the method's defining class. |
| private Map | |
| public Map | Returns: A map from annotation class to annotation valueA Java Constructor cons)Same as cons.getAnnotations, with the result converted to a map. |
| public Map | Returns: A map from annotation class to annotation valueA Java Field fld)Same as fld.getAnnotations, with the result converted to a map. |
| public Map | Returns: A map from annotation class to annotation valueA Java Package pkg)Same as pkg.getAnnotations, with the result converted to a map. |
| public Map | Returns: A map from annotation class to annotation value.AnnotatedElement elem)Return all annotations on the element, including any added annotations. |
| public List | Returns: A list of maps from annotation class to annotation valueA Java Method method)Same as cons.getParameterAnnotations, with the result converted to a list of maps. |
| public List | Returns: A list of maps from annotation class to annotation valueA Java Constructor cons)Same as cons.getParameterAnnotations, with the result converted to a list of maps. |
| private Map | |
| private synchronized <K, V> void |
| addedAnnotations | back to summary |
|---|---|
| private final Map<AnnotatedElement, Map<Class<?>, Annotation>> addedAnnotations | |
| annotationCache | back to summary |
|---|---|
| private final Map<AnnotatedElement, Map<Class<?>, Annotation>> annotationCache | |
| AnnotationAnalyzer | back to summary |
|---|---|
| public AnnotationAnalyzer() | |
| addAnnotation | back to summary |
|---|---|
| public synchronized void addAnnotation(AnnotatedElement element, Annotation annotation) Add an annotation to element, which must be a Class, Method, or Constructor. | |
| addInheritedAnnotations | back to summary |
|---|---|
| public synchronized void addInheritedAnnotations(final Class<?> cls, final Class<?> ancestor) Add all annotations on cls (including inherited annotations and its methods (including overridden methods in super classes and interfaces) to super (which must be a super class or interface of cls). | |
| getAnnotation | back to summary |
|---|---|
| public <A extends Annotation> A getAnnotation(AnnotatedElement elem, Class<A> cls) | |
| getAnnotations | back to summary |
|---|---|
| public Map Return a map of all annotations defined on cls and its super classes and interfaces in ClassAnalyzer order. Annotations nearer the front of the list replace those later in the list of the same type.
| |
| getAnnotations | back to summary |
|---|---|
| private Map | |
| getAnnotations | back to summary |
|---|---|
| public Map Return a map of all annotations defined in method and its overriden methods in the inheritance order of the ClassAnalyzer for the method's defining class.
| |
| getAnnotations | back to summary |
|---|---|
| private Map | |
| getAnnotations | back to summary |
|---|---|
| public Map Same as cons.getAnnotations, with the result converted to a map.
| |
| getAnnotations | back to summary |
|---|---|
| public Map Same as fld.getAnnotations, with the result converted to a map.
| |
| getAnnotations | back to summary |
|---|---|
| public Map Same as pkg.getAnnotations, with the result converted to a map.
| |
| getAnnotations | back to summary |
|---|---|
| public Map Return all annotations on the element, including any added annotations. Really just a convenience wrapper for the other getAnnotations methods.
| |
| getParameterAnnotations | back to summary |
|---|---|
| public List Same as cons.getParameterAnnotations, with the result converted to a list of maps.
| |
| getParameterAnnotations | back to summary |
|---|---|
| public List Same as cons.getParameterAnnotations, with the result converted to a list of maps.
| |
| makeAnnoMap | back to summary |
|---|---|
| private Map | |
| putIfNotPresent | back to summary |
|---|---|
| private synchronized <K, V> void putIfNotPresent(final Map<K, V> map, final K key, final V value) | |