public class MetaAnnotationScanner extends Object implements AnnotationScanner
TypeAnnotationScanner冲突TypeAnnotationScanner| 构造器和说明 |
|---|
MetaAnnotationScanner()
构造一个元注解扫描器,默认在扫描当前注解上的元注解后,并继续递归扫描元注解
|
MetaAnnotationScanner(boolean includeSupperMetaAnnotation)
构造
|
| 限定符和类型 | 方法和说明 |
|---|---|
List<Annotation> |
getAnnotations(AnnotatedElement annotatedElement)
获取可注解元素上的全部注解。
|
void |
scan(BiConsumer<Integer,Annotation> consumer,
Class<? extends Annotation> source,
Predicate<Annotation> filter)
按广度优先扫描指定注解上的元注解,对扫描到的注解与层级索引进行操作
|
boolean |
support(AnnotatedElement annotatedElement)
是否支持扫描该可注解元素
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetIfSupport, scanByAllScanner, scanByAnySupportedpublic MetaAnnotationScanner(boolean includeSupperMetaAnnotation)
includeSupperMetaAnnotation - 获取当前注解的元注解后,是否继续递归扫描的元注解的元注解public MetaAnnotationScanner()
public boolean support(AnnotatedElement annotatedElement)
AnnotationScannersupport 在接口中 AnnotationScannerannotatedElement - 可注解元素public void scan(BiConsumer<Integer,Annotation> consumer, Class<? extends Annotation> source, Predicate<Annotation> filter)
consumer - 当前层级索引与操作source - 源注解filter - 过滤器public List<Annotation> getAnnotations(AnnotatedElement annotatedElement)
AnnotationScannerAnnotationScanner.support(AnnotatedElement)返回为truegetAnnotations 在接口中 AnnotationScannerannotatedElement - 可注解元素Copyright © 2022. All rights reserved.