class AnnotatedElementUtils
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
private static interface |
AnnotatedElementUtils.Processor<T>
Callback interface used to process an annotation.
|
Constructor and Description |
---|
AnnotatedElementUtils() |
Modifier and Type | Method and Description |
---|---|
static MultiValueMap<java.lang.String,java.lang.Object> |
getAllAnnotationAttributes(java.lang.reflect.AnnotatedElement element,
java.lang.String annotationType,
boolean classValuesAsString,
boolean nestedAnnotationsAsMap) |
static java.util.Map<java.lang.String,java.lang.Object> |
getAnnotationAttributes(java.lang.reflect.AnnotatedElement element,
java.lang.String annotationType,
boolean classValuesAsString,
boolean nestedAnnotationsAsMap) |
static java.util.Set<java.lang.String> |
getMetaAnnotationTypes(java.lang.reflect.AnnotatedElement element,
java.lang.String annotationType) |
static boolean |
hasMetaAnnotationTypes(java.lang.reflect.AnnotatedElement element,
java.lang.String annotationType) |
static boolean |
isAnnotated(java.lang.reflect.AnnotatedElement element,
java.lang.String annotationType) |
private static <T> T |
process(java.lang.reflect.AnnotatedElement element,
java.lang.String annotationType,
AnnotatedElementUtils.Processor<T> processor)
Process all annotations of the specified annotation type and recursively all
meta-annotations on the specified type.
|
private static <T> T |
recursivelyProcess(java.lang.reflect.AnnotatedElement element,
java.lang.String annotationType,
AnnotatedElementUtils.Processor<T> processor,
java.util.Set<java.lang.reflect.AnnotatedElement> visited,
int depth) |
public static java.util.Set<java.lang.String> getMetaAnnotationTypes(java.lang.reflect.AnnotatedElement element, java.lang.String annotationType)
public static boolean hasMetaAnnotationTypes(java.lang.reflect.AnnotatedElement element, java.lang.String annotationType)
public static boolean isAnnotated(java.lang.reflect.AnnotatedElement element, java.lang.String annotationType)
public static java.util.Map<java.lang.String,java.lang.Object> getAnnotationAttributes(java.lang.reflect.AnnotatedElement element, java.lang.String annotationType, boolean classValuesAsString, boolean nestedAnnotationsAsMap)
public static MultiValueMap<java.lang.String,java.lang.Object> getAllAnnotationAttributes(java.lang.reflect.AnnotatedElement element, java.lang.String annotationType, boolean classValuesAsString, boolean nestedAnnotationsAsMap)
private static <T> T process(java.lang.reflect.AnnotatedElement element, java.lang.String annotationType, AnnotatedElementUtils.Processor<T> processor)
element
- the annotated elementannotationType
- the annotation type to find. Only items of the specified type
or meta-annotations of the specified type will be processedprocessor
- the processorprivate static <T> T recursivelyProcess(java.lang.reflect.AnnotatedElement element, java.lang.String annotationType, AnnotatedElementUtils.Processor<T> processor, java.util.Set<java.lang.reflect.AnnotatedElement> visited, int depth)