Class FieldScanner
java.lang.Object
org.aoju.bus.core.scanner.annotation.FieldScanner
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidscan(BiConsumer<Integer, Annotation> consumer, AnnotatedElement annotatedEle, Predicate<Annotation> filter) 扫描Field上直接声明的注解,调用前需要确保调用support(AnnotatedElement)返回为truebooleansupport(AnnotatedElement annotatedEle) 判断是否支持扫描该注解元素,仅当注解元素是Field时返回trueMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.aoju.bus.core.scanner.AnnotationScanner
getAnnotations, getIfSupport, scanIfSupport
-
Constructor Details
-
FieldScanner
public FieldScanner()
-
-
Method Details
-
support
判断是否支持扫描该注解元素,仅当注解元素是Field时返回true- Specified by:
supportin interfaceAnnotationScanner- Parameters:
annotatedEle-AnnotatedElement,可以是Class、Method、Field、Constructor、ReflectPermission- Returns:
- 是否支持扫描该注解元素
-
scan
public void scan(BiConsumer<Integer, Annotation> consumer, AnnotatedElement annotatedEle, Predicate<Annotation> filter) 扫描Field上直接声明的注解,调用前需要确保调用support(AnnotatedElement)返回为true- Specified by:
scanin interfaceAnnotationScanner- Parameters:
consumer- 对获取到的注解和注解对应的层级索引的处理annotatedEle-AnnotatedElement,可以是Class、Method、Field、Constructor、ReflectPermissionfilter- 注解过滤器,无法通过过滤器的注解不会被处理。该参数允许为空。
-