public abstract class AnnotationUtils extends Object
Annotation UtilitiesAnnotation| 构造器 | 说明 |
|---|---|
AnnotationUtils() |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
static <A extends Annotation> |
findAnnotations(Method method,
Class<A> annotationClass) |
Find specified
Annotation type maps from Method |
static <A extends Annotation> |
isPresent(Method method,
Class<A> annotationClass) |
Is specified
Annotation present on Method's declaring class or parameters or itself. |
public static <A extends Annotation> boolean isPresent(Method method, Class<A> annotationClass)
Annotation present on Method's declaring class or parameters or itself.A - Annotation typemethod - MethodannotationClass - Annotation typetrue , or falsepublic static <A extends Annotation> Map<ElementType,List<A>> findAnnotations(Method method, Class<A> annotationClass)
Annotation type maps from MethodA - Annotation typemethod - MethodannotationClass - Annotation typeAnnotation type maps , the ElementType as key ,
the list of Annotation as value.
If Annotation was annotated on Method's parametersElementType.PARAMETER ,
the associated Annotation list may contain multiple elements.Copyright © 2018. All rights reserved.