public class MybatisFlexProcessor extends AbstractProcessor
| 限定符和类型 | 字段和说明 |
|---|---|
private MybatisFlexConfig |
configuration |
private static List<String> |
DEFAULT_SUPPORT_COLUMN_TYPES |
private Elements |
elementUtils |
private Filer |
filer |
private Types |
typeUtils |
processingEnv| 构造器和说明 |
|---|
MybatisFlexProcessor() |
| 限定符和类型 | 方法和说明 |
|---|---|
private void |
fillColumnInfoList(Set<ColumnInfo> columnInfos,
List<String> defaultColumns,
TypeElement baseElement,
TypeElement classElement,
boolean camelToUnderline)
通过 classElement 操作起所有字段,生成 ColumnInfo 并填充 columnInfos 结合
|
private String[] |
getColumnAliasByGetterMethod(TypeElement baseElement,
String property) |
Set<String> |
getSupportedAnnotationTypes() |
SourceVersion |
getSupportedSourceVersion() |
void |
init(ProcessingEnvironment processingEnvironment) |
boolean |
process(Set<? extends TypeElement> annotations,
RoundEnvironment roundEnv) |
private void |
processGenClass(String genBasePath,
String genPackageName,
String className,
String genContent) |
getCompletions, getSupportedOptions, isInitializedprivate static final List<String> DEFAULT_SUPPORT_COLUMN_TYPES
private Elements elementUtils
private MybatisFlexConfig configuration
public MybatisFlexProcessor()
public void init(ProcessingEnvironment processingEnvironment)
init 在接口中 Processorinit 在类中 AbstractProcessorpublic boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv)
process 在接口中 Processorprocess 在类中 AbstractProcessorpublic Set<String> getSupportedAnnotationTypes()
getSupportedAnnotationTypes 在接口中 ProcessorgetSupportedAnnotationTypes 在类中 AbstractProcessorpublic SourceVersion getSupportedSourceVersion()
getSupportedSourceVersion 在接口中 ProcessorgetSupportedSourceVersion 在类中 AbstractProcessorprivate void fillColumnInfoList(Set<ColumnInfo> columnInfos, List<String> defaultColumns, TypeElement baseElement, TypeElement classElement, boolean camelToUnderline)
private String[] getColumnAliasByGetterMethod(TypeElement baseElement, String property)
private void processGenClass(String genBasePath, String genPackageName, String className, String genContent)
Copyright © 2023. All rights reserved.