public class AnnotationScanner extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Map<Class<?>,List<Annotation>> |
classes |
protected Set<Class<?>> |
visitedClasses |
| Constructor and Description |
|---|
AnnotationScanner() |
| Modifier and Type | Method and Description |
|---|---|
protected List<Annotation> |
collectAnnotations(Class<?> clazz)
TODO when collecting annotations annotated with
Inherited they will be collected twice. |
<T extends Annotation> |
getAnnotation(Class<?> clazz,
Class<T> annotationType) |
List<? extends Annotation> |
getAnnotations(Class<?> clazz) |
<T extends Annotation> |
getAnnotations(Class<?> clazz,
Class<T> annotationType) |
<T extends Annotation> |
getFirstAnnotation(Class<?> clazz,
Class<T> annotationType) |
void |
scan(Class<?> clazz) |
protected final Set<Class<?>> visitedClasses
protected final Map<Class<?>,List<Annotation>> classes
public AnnotationScanner()
public List<? extends Annotation> getAnnotations(Class<?> clazz)
public <T extends Annotation> T getAnnotation(Class<?> clazz, Class<T> annotationType)
public <T extends Annotation> T getFirstAnnotation(Class<?> clazz, Class<T> annotationType)
public <T extends Annotation> List<T> getAnnotations(Class<?> clazz, Class<T> annotationType)
protected List<Annotation> collectAnnotations(Class<?> clazz)
Inherited they will be collected twice.clazz - result - visitedClasses - Copyright © 2015 Nuxeo SA. All rights reserved.