public abstract class BaseMethodProcessor extends BaseProcessor
messager, names, processContext, treeMaker, treesprocessingEnv| 构造器和说明 |
|---|
BaseMethodProcessor() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected abstract Class<? extends Annotation> |
getAnnotationClass()
获取抽象的注解类型
|
protected List<LMethod> |
getMethodList(RoundEnvironment roundEnv,
Class<? extends Annotation> annotationClass)
获取带有指定注解的方法
|
protected abstract void |
handleMethod(LMethod method)
处理单个类信息
|
boolean |
process(Set<? extends TypeElement> annotations,
RoundEnvironment roundEnv) |
initgetCompletions, getSupportedAnnotationTypes, getSupportedOptions, getSupportedSourceVersion, isInitializedprotected abstract Class<? extends Annotation> getAnnotationClass()
protected abstract void handleMethod(LMethod method)
method - 单个方法息public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv)
process 在接口中 Processorprocess 在类中 AbstractProcessorprotected List<LMethod> getMethodList(RoundEnvironment roundEnv, Class<? extends Annotation> annotationClass)
roundEnv - 环境信息annotationClass - 注解类Copyright © 2020. All rights reserved.