public class EmptyAnnotationScanner extends Object implements AnnotationScanner
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 |
---|
EmptyAnnotationScanner() |
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 boolean support(AnnotatedElement annotatedEle)
AnnotationScanner
support
in interface AnnotationScanner
annotatedEle
- AnnotatedElement
,可以是Class、Method、Field、Constructor、ReflectPermissionpublic List<Annotation> getAnnotations(AnnotatedElement annotatedEle)
AnnotationScanner
AnnotationScanner.support(AnnotatedElement)
返回为truegetAnnotations
in interface AnnotationScanner
annotatedEle
- AnnotatedElement
,可以是Class、Method、Field、Constructor、ReflectPermissionpublic void scan(BiConsumer<Integer,Annotation> consumer, AnnotatedElement annotatedEle, Predicate<Annotation> filter)
AnnotationScanner
AnnotationScanner.support(AnnotatedElement)
返回为truescan
in interface AnnotationScanner
consumer
- 对获取到的注解和注解对应的层级索引的处理annotatedEle
- AnnotatedElement
,可以是Class、Method、Field、Constructor、ReflectPermissionfilter
- 注解过滤器,无法通过过滤器的注解不会被处理。该参数允许为空。Copyright © 2024. All rights reserved.