public interface AnnotationFinder
SimpleAnnotationFinder| 限定符和类型 | 方法和说明 |
|---|---|
<A extends Annotation> |
findAllAnnotations(@NonNull AnnotatedElement element,
Class<A> annotationType)
Get all indirectly specified annotations from the element.
|
<A extends Annotation> |
findAnnotation(@NonNull AnnotatedElement element,
Class<A> annotationType)
Get the indirectly specified annotation from the element.
|
<A extends Annotation> |
getAllAnnotations(@NonNull AnnotatedElement element,
Class<A> annotationType)
Get all specified annotations from the element.
|
<A extends Annotation> |
getAnnotation(@NonNull AnnotatedElement element,
Class<A> annotationType)
Get the specified annotation from the element.
|
default boolean |
hasAnnotation(@NonNull AnnotatedElement element,
Class<? extends Annotation> annotationType)
Whether the specified annotation exists on the element.
|
default boolean |
isAnnotated(@NonNull AnnotatedElement element,
Class<? extends Annotation> annotationType)
Whether the specified annotation indirectly exists on the element.
|
<A extends Annotation> A getAnnotation(@NonNull AnnotatedElement element, Class<A> annotationType)
A - annotation typeelement - elementannotationType - annotation typedefault boolean hasAnnotation(@NonNull AnnotatedElement element, Class<? extends Annotation> annotationType)
element - elementannotationType - annotation type<A extends Annotation> Set<A> getAllAnnotations(@NonNull AnnotatedElement element, Class<A> annotationType)
A - annotation typeelement - elementannotationType - annotation type<A extends Annotation> A findAnnotation(@NonNull AnnotatedElement element, Class<A> annotationType)
A - annotation typeelement - elementannotationType - annotation typedefault boolean isAnnotated(@NonNull AnnotatedElement element, Class<? extends Annotation> annotationType)
element - elementannotationType - annotation type<A extends Annotation> Set<A> findAllAnnotations(@NonNull AnnotatedElement element, Class<A> annotationType)
A - annotation typeelement - elementannotationType - annotation typeCopyright © 2024. All rights reserved.