public class FieldAnnotationScanner extends Object implements AnnotationScanner
Field上的注解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 |
|---|
FieldAnnotationScanner() |
| Modifier and Type | Method and Description |
|---|---|
void |
scan(BiConsumer<Integer,Annotation> consumer,
AnnotatedElement annotatedEle,
Predicate<Annotation> filter)
扫描
Field上直接声明的注解,调用前需要确保调用support(AnnotatedElement)返回为true |
boolean |
support(AnnotatedElement annotatedEle)
判断是否支持扫描该注解元素,仅当注解元素是
Field时返回true |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAnnotations, getAnnotationsIfSupport, scanByAllSupported, scanByAnySupported, scanIfSupportpublic boolean support(AnnotatedElement annotatedEle)
Field时返回truesupport in interface AnnotationScannerannotatedEle - AnnotatedElement,可以是Class、Method、Field、Constructor、ReflectPermissionpublic void scan(BiConsumer<Integer,Annotation> consumer, AnnotatedElement annotatedEle, Predicate<Annotation> filter)
Field上直接声明的注解,调用前需要确保调用support(AnnotatedElement)返回为truescan in interface AnnotationScannerconsumer - 对获取到的注解和注解对应的层级索引的处理annotatedEle - AnnotatedElement,可以是Class、Method、Field、Constructor、ReflectPermissionfilter - 注解过滤器,无法通过过滤器的注解不会被处理。该参数允许为空。Copyright © 2025. All rights reserved.