public abstract class AnnotationUtils
extends java.lang.Object
Annotation UtilitiesAnnotation| 构造器 | 说明 |
|---|---|
AnnotationUtils() |
| 修饰符和类型 | 方法 | 说明 |
|---|---|---|
static <A extends java.lang.annotation.Annotation> |
findAnnotations(java.lang.reflect.Method method,
java.lang.Class<A> annotationClass) |
Find specified
Annotation type maps from Method |
static <A extends java.lang.annotation.Annotation> |
isPresent(java.lang.reflect.Method method,
java.lang.Class<A> annotationClass) |
Is specified
Annotation present on Method's declaring class or parameters or itself. |
public static <A extends java.lang.annotation.Annotation> boolean isPresent(java.lang.reflect.Method method,
java.lang.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 java.lang.annotation.Annotation> java.util.Map<java.lang.annotation.ElementType,java.util.List<A>> findAnnotations(java.lang.reflect.Method method,
java.lang.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.