T - 查找的对象类型public class AnnotationFinder<T> extends Object implements AnnotationProcessor
用于在AbstractAnnotationScanner扫描过程中查找指定注解的注解处理器。
当查找到第一个符合给定条件的注解后,扫描器将中断扫描,不再继续向后查找
| 构造器和说明 |
|---|
AnnotationFinder(Function3<Integer,Integer,Annotation,T> converter,
Predicate<T> predicate)
创建一个注解查找器
|
public void accept(int verticalIndex,
int horizontalIndex,
Annotation annotation)
accept 在接口中 AnnotationProcessorverticalIndex - 垂直索引。一般表示与扫描器扫描的AnnotatedElement相隔的层级层次。默认从1开始horizontalIndex - 水平索引,一般用于衡量两个注解对象之间被扫描到的先后顺序。默认从1开始annotation - 被扫描到的注解对象public boolean interrupted()
#isFound()返回false时中断扫描interrupted 在接口中 AnnotationProcessorCopyright © 2022. All rights reserved.