public class MetaAnnotationScanner extends Object implements AnnotationScanner
TypeAnnotationScanner
冲突TypeAnnotationScanner
DIRECTLY, DIRECTLY_AND_META_ANNOTATION, INTERFACE, INTERFACE_AND_META_ANNOTATION, NOTHING, SUPERCLASS, SUPERCLASS_AND_META_ANNOTATION, TYPE_HIERARCHY, TYPE_HIERARCHY_AND_META_ANNOTATION
Constructor and Description |
---|
MetaAnnotationScanner()
构造一个元注解扫描器,默认在扫描当前注解上的元注解后,并继续递归扫描元注解
|
MetaAnnotationScanner(boolean includeSupperMetaAnnotation)
构造一个元注解扫描器
|
Modifier and Type | Method and Description |
---|---|
List<Annotation> |
getAnnotations(AnnotatedElement annotatedEle)
获取注解元素上的全部注解。
|
void |
scan(BiConsumer<Integer,Annotation> consumer,
AnnotatedElement annotatedEle,
Predicate<Annotation> filter)
按广度优先扫描指定注解上的元注解,对扫描到的注解与层级索引进行操作
|
boolean |
support(AnnotatedElement annotatedEle)
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAnnotationsIfSupport, scanByAllSupported, scanByAnySupported, scanIfSupport
public MetaAnnotationScanner(boolean includeSupperMetaAnnotation)
includeSupperMetaAnnotation
- 获取当前注解的元注解后,是否继续递归扫描的元注解的元注解public MetaAnnotationScanner()
public boolean support(AnnotatedElement annotatedEle)
support
in interface AnnotationScanner
annotatedEle
- AnnotatedElement
,可以是Class、Method、Field、Constructor、ReflectPermissionpublic List<Annotation> getAnnotations(AnnotatedElement annotatedEle)
support(AnnotatedElement)
返回为truegetAnnotations
in interface AnnotationScanner
annotatedEle
- AnnotatedElement
,可以是Class、Method、Field、Constructor、ReflectPermissionpublic void scan(BiConsumer<Integer,Annotation> consumer, AnnotatedElement annotatedEle, Predicate<Annotation> filter)
scan
in interface AnnotationScanner
consumer
- 当前层级索引与操作annotatedEle
- AnnotatedElement
,可以是Class、Method、Field、Constructor、ReflectPermissionfilter
- 过滤器Copyright © 2024. All rights reserved.