索引
所有程序包|所有类和接口
A
- AbstractGenerator<T> - cn.wjybxx.apt中的类
- AbstractGenerator(T, TypeElement) - 类的构造器 cn.wjybxx.apt.AbstractGenerator
- ANNOTATION_NONNULL - 类中的静态变量 cn.wjybxx.apt.AptUtils
- ANNOTATION_OVERRIDE - 类中的静态变量 cn.wjybxx.apt.AptUtils
- AptUtils - cn.wjybxx.apt中的类
B
- BeanUtils - cn.wjybxx.apt中的类
-
java bean 工具类
- BeanUtils() - 类的构造器 cn.wjybxx.apt.BeanUtils
- boxedTypeNameMap - 类中的静态变量 cn.wjybxx.apt.AptUtils
C
- classNameOfCanonicalName(String) - 类中的静态方法 cn.wjybxx.apt.AptUtils
- CLSNAME_ARRAY_LIST - 类中的静态变量 cn.wjybxx.apt.AptUtils
- CLSNAME_ARRAYS - 类中的静态变量 cn.wjybxx.apt.AptUtils
- CLSNAME_BYTES - 类中的静态变量 cn.wjybxx.apt.AptUtils
- CLSNAME_FUTURE - 类中的静态变量 cn.wjybxx.apt.AptUtils
- CLSNAME_HASH_MAP - 类中的静态变量 cn.wjybxx.apt.AptUtils
- CLSNAME_HASH_SET - 类中的静态变量 cn.wjybxx.apt.AptUtils
- CLSNAME_LINKED_MAP - 类中的静态变量 cn.wjybxx.apt.AptUtils
- CLSNAME_LINKED_SET - 类中的静态变量 cn.wjybxx.apt.AptUtils
- CLSNAME_LIST - 类中的静态变量 cn.wjybxx.apt.AptUtils
- CLSNAME_MAP - 类中的静态变量 cn.wjybxx.apt.AptUtils
- CLSNAME_OBJECTS - 类中的静态变量 cn.wjybxx.apt.AptUtils
- CLSNAME_SET - 类中的静态变量 cn.wjybxx.apt.AptUtils
- CLSNAME_SOURCE_REF - 类中的静态变量 cn.wjybxx.apt.AptUtils
- CLSNAME_STAGE - 类中的静态变量 cn.wjybxx.apt.AptUtils
- CLSNAME_STRING - 类中的静态变量 cn.wjybxx.apt.AptUtils
- CLSNAME_SUPPLIER - 类中的静态变量 cn.wjybxx.apt.AptUtils
- cn.wjybxx.apt - 程序包 cn.wjybxx.apt
- containsNoArgsConstructor(TypeElement) - 类中的静态方法 cn.wjybxx.apt.BeanUtils
-
判断一个类是否包含无参构造方法
- containsNotPrivateGetter(Types, VariableElement, List<? extends Element>) - 类中的静态方法 cn.wjybxx.apt.BeanUtils
-
是否包含非private的getter方法
- containsNotPrivateSetter(Types, VariableElement, List<? extends Element>) - 类中的静态方法 cn.wjybxx.apt.BeanUtils
-
是否包含非private的setter方法
- containsOneArgsConstructor(Types, TypeElement, TypeMirror) - 类中的静态方法 cn.wjybxx.apt.BeanUtils
-
判断一个类是否包含指定参数的单参构造方法
- copyExceptionsTable(MethodSpec.Builder, ExecutableElement) - 类中的静态方法 cn.wjybxx.apt.AptUtils
-
拷贝一个方法的异常表
- copyMethod(ExecutableElement) - 类中的静态方法 cn.wjybxx.apt.AptUtils
-
复制一个方法信息,当然不包括代码块。
- copyModifiers(MethodSpec.Builder, ExecutableElement) - 类中的静态方法 cn.wjybxx.apt.AptUtils
-
拷贝一个方法的修饰符
- copyParameters(MethodSpec.Builder, List<? extends VariableElement>) - 类中的静态方法 cn.wjybxx.apt.AptUtils
-
拷贝这些方法参数
- copyParameters(MethodSpec.Builder, ExecutableElement) - 类中的静态方法 cn.wjybxx.apt.AptUtils
-
拷贝一个方法的所有参数
- copyReturnType(MethodSpec.Builder, ExecutableElement) - 类中的静态方法 cn.wjybxx.apt.AptUtils
-
拷贝返回值类型
- copyTypeVariables(MethodSpec.Builder, ExecutableElement) - 类中的静态方法 cn.wjybxx.apt.AptUtils
-
拷贝一个方法的所有泛型参数
D
- doProcess(Set<? extends TypeElement>, RoundEnvironment) - 类中的方法 cn.wjybxx.apt.MyAbstractProcessor
-
如果返回true,表示注解已经被认领,并且不会要求后续处理器处理它们; 如果返回false,表示注解类型无人认领,并且可能要求后续处理器处理它们。
E
- elementUtils - 类中的变量 cn.wjybxx.apt.AbstractGenerator
- elementUtils - 类中的变量 cn.wjybxx.apt.MyAbstractProcessor
- ensureInited() - 类中的方法 cn.wjybxx.apt.MyAbstractProcessor
-
确保完成了初始化
- execute() - 类中的方法 cn.wjybxx.apt.AbstractGenerator
F
- filer - 类中的变量 cn.wjybxx.apt.AbstractGenerator
- filer - 类中的变量 cn.wjybxx.apt.MyAbstractProcessor
- findAllInterfaces(Types, Elements, TypeElement) - 类中的静态方法 cn.wjybxx.apt.AptUtils
-
注意:无法保证顺序 -- 这个方法还不太稳定
- findAnnotation(Types, Element, TypeMirror) - 类中的静态方法 cn.wjybxx.apt.AptUtils
-
查找出现的第一个注解,不包含继承的部分
- findAnnotationWithInherit(Types, Elements, Element, TypeMirror) - 类中的静态方法 cn.wjybxx.apt.AptUtils
-
查找出现的第一个注解,包含继承的注解
- findDeclaredType(TypeMirror) - 类中的静态方法 cn.wjybxx.apt.AptUtils
-
获取一个元素的声明类型
- findFieldByName(TypeElement, String) - 类中的静态方法 cn.wjybxx.apt.AptUtils
-
通过名字查找对应的字段
- findFirstTypeParameter(TypeMirror) - 类中的静态方法 cn.wjybxx.apt.AptUtils
-
获取第一个泛型参数
- findMethodByName(TypeElement, String) - 类中的静态方法 cn.wjybxx.apt.AptUtils
-
通过名字查找对应的方法
- findNotPrivateGetter(Types, VariableElement, List<? extends Element>) - 类中的静态方法 cn.wjybxx.apt.BeanUtils
-
该方法会查询标准的getter命名,同时会查询
get + firstCharToUpperCase(fieldName)格式的命名 - findNotPrivateSetter(Types, VariableElement, List<? extends Element>) - 类中的静态方法 cn.wjybxx.apt.BeanUtils
-
该方法会查询标准的setter命名,同时会查询
set + firstCharToUpperCase(fieldName)格式的命名 - firstCharToLowerCase(String) - 类中的静态方法 cn.wjybxx.apt.BeanUtils
-
首字母小写
- firstCharToUpperCase(String) - 类中的静态方法 cn.wjybxx.apt.BeanUtils
-
首字符大写
- flatInherit(TypeElement) - 类中的静态方法 cn.wjybxx.apt.AptUtils
-
将继承体系展开,不包含实现的接口。
- flatInheritAndReverse(TypeElement) - 类中的静态方法 cn.wjybxx.apt.AptUtils
-
将继承体系展开,并逆序返回,不包含实现的接口。
G
- getAllFieldsAndMethodsWithInherit(TypeElement) - 类中的静态方法 cn.wjybxx.apt.BeanUtils
-
获取类的所有字段和方法,包含继承得到的字段和方法 注意:不包含接口和静态字段。
- getAllFieldsWithInherit(TypeElement) - 类中的静态方法 cn.wjybxx.apt.BeanUtils
- getAllMethodsWithInherit(TypeElement) - 类中的静态方法 cn.wjybxx.apt.BeanUtils
-
获取类所有的方法,包含继承得到的方法
Elements.getAllMembers(TypeElement)只包含父类的公共属性,不包含私有的东西。 - getAnnotationValue(AnnotationMirror, String) - 类中的静态方法 cn.wjybxx.apt.AptUtils
-
获取注解上的某一个属性的值,不包含default值
- getAnnotationValuesMap(AnnotationMirror) - 类中的静态方法 cn.wjybxx.apt.AptUtils
-
将注解属性转换为 name -> AnnotationValue 的Map
- getAnnotationValueTypeMirror(AnnotationValue) - 类中的静态方法 cn.wjybxx.apt.AptUtils
-
获取注解中引用的class对象的类型 eg:
- getAnnotationValueValue(AnnotationMirror, String) - 类中的静态方法 cn.wjybxx.apt.AptUtils
-
获取注解上的某一个属性的值,不包含default值
- getAnnotationValueValue(AnnotationMirror, String, T) - 类中的静态方法 cn.wjybxx.apt.AptUtils
- getAnnotationValueValueWithDefaults(Elements, AnnotationMirror, String) - 类中的静态方法 cn.wjybxx.apt.AptUtils
-
获取注解上的某一个属性的值,包含default值
- getAnnotationValueWithDefaults(Elements, AnnotationMirror, String) - 类中的静态方法 cn.wjybxx.apt.AptUtils
-
获取注解上的某一个属性的值,包含default值
- getComponentType(TypeMirror) - 类中的静态方法 cn.wjybxx.apt.AptUtils
- getNoArgsConstructor(TypeElement) - 类中的静态方法 cn.wjybxx.apt.BeanUtils
-
查找无参构造方法
- getOneArgsConstructor(Types, TypeElement, TypeMirror) - 类中的静态方法 cn.wjybxx.apt.BeanUtils
-
查找单参数的构造方法
- getPackageName(TypeElement, Elements) - 类中的静态方法 cn.wjybxx.apt.AptUtils
-
获取一个类或接口所属的包名
- getProxyClassName(Elements, TypeElement, String) - 类中的静态方法 cn.wjybxx.apt.AptUtils
-
根据原类型,生成获得对应的辅助类的类名 对于内部类,生成的类为:外部类名_内部类名
- getStackTrace(Throwable) - 类中的静态方法 cn.wjybxx.apt.AptUtils
-
获取堆栈信息,避免引入commons-lang3
- getSupportedAnnotationTypes() - 类中的方法 cn.wjybxx.apt.MyAbstractProcessor
- getSupportedSourceVersion() - 类中的方法 cn.wjybxx.apt.MyAbstractProcessor
- getterMethodName(String, boolean) - 类中的静态方法 cn.wjybxx.apt.BeanUtils
-
获取标准getter方法的名字
- getTypeElementOfClass(Elements, Class<?>) - 类中的静态方法 cn.wjybxx.apt.AptUtils
- getTypeMirrorOfClass(Elements, Class<?>) - 类中的静态方法 cn.wjybxx.apt.AptUtils
I
- init(ProcessingEnvironment) - 类中的方法 cn.wjybxx.apt.MyAbstractProcessor
- isAnnotationPresent(Types, Element, TypeMirror) - 类中的静态方法 cn.wjybxx.apt.AptUtils
-
查找指定注解是否出现
- isArrayType(TypeMirror) - 类中的静态方法 cn.wjybxx.apt.AptUtils
-
是否是数组类型
- isBlank(String) - 类中的静态方法 cn.wjybxx.apt.AptUtils
- isBoxedType(TypeName) - 类中的静态方法 cn.wjybxx.apt.AptUtils
-
查询给定TypeName是否是包装类型 -- 比使用equals快
- isByteArray(TypeMirror) - 类中的静态方法 cn.wjybxx.apt.AptUtils
-
判断一个对象是否是字节数组
- isEmpty(String) - 类中的静态方法 cn.wjybxx.apt.AptUtils
- isEmpty(Collection<?>) - 类中的静态方法 cn.wjybxx.apt.AptUtils
- isEmpty(Map<?, ?>) - 类中的静态方法 cn.wjybxx.apt.AptUtils
- isPrimitiveBoolean(TypeMirror) - 类中的静态方法 cn.wjybxx.apt.AptUtils
-
是否是基本类型的boolean
- isSameTypeIgnoreTypeParameter(Types, TypeMirror, TypeMirror) - 类中的静态方法 cn.wjybxx.apt.AptUtils
-
忽略两个类型的泛型参数,判断第一个和第二个类型是否相同 如果考虑泛型的话,会存在区别
- isSubTypeIgnoreTypeParameter(Types, TypeMirror, TypeMirror) - 类中的静态方法 cn.wjybxx.apt.AptUtils
-
忽略两个类型的泛型参数,判断第一个是否是第二个的子类型。
M
- messager - 类中的变量 cn.wjybxx.apt.AbstractGenerator
- messager - 类中的变量 cn.wjybxx.apt.MyAbstractProcessor
- MyAbstractProcessor - cn.wjybxx.apt中的类
-
封装模块,避免子类错误实现
- MyAbstractProcessor() - 类的构造器 cn.wjybxx.apt.MyAbstractProcessor
N
- newProcessorInfoAnnotation(Class<?>) - 类中的静态方法 cn.wjybxx.apt.AptUtils
-
为生成代码的注解处理器创建一个通用注解
- newSourceFileRefAnnotation(TypeName) - 类中的静态方法 cn.wjybxx.apt.AptUtils
-
添加一个指向源代码文件的引用 方便查看文件的依赖
P
- primitiveTypeNameMap - 类中的静态变量 cn.wjybxx.apt.AptUtils
- PRIVATE_STATIC_FINAL - 类中的静态变量 cn.wjybxx.apt.AptUtils
- process(Set<? extends TypeElement>, RoundEnvironment) - 类中的方法 cn.wjybxx.apt.MyAbstractProcessor
- processor - 类中的变量 cn.wjybxx.apt.AbstractGenerator
- processorInfoAnnotation - 类中的变量 cn.wjybxx.apt.AbstractGenerator
- processorInfoAnnotation - 类中的变量 cn.wjybxx.apt.MyAbstractProcessor
- PUBLIC_STATIC - 类中的静态变量 cn.wjybxx.apt.AptUtils
- PUBLIC_STATIC_FINAL - 类中的静态变量 cn.wjybxx.apt.AptUtils
S
- selectSourceFile(Set<TypeElement>, Elements) - 类中的静态方法 cn.wjybxx.apt.AptUtils
-
筛选出java源文件 - 去除带有注解的class文件,用于避免二次处理某个文件。
- selectSourceFile(RoundEnvironment, Elements, TypeElement) - 类中的静态方法 cn.wjybxx.apt.AptUtils
-
筛选出java源文件 - 去除带有注解的class文件,用于避免二次处理某个文件。
- selectSourceFileAny(RoundEnvironment, Elements, TypeElement...) - 类中的静态方法 cn.wjybxx.apt.AptUtils
-
筛选出java源文件 - 去除带有注解的class文件,用于避免二次处理某个文件。
- setterMethodName(String, boolean) - 类中的静态方法 cn.wjybxx.apt.BeanUtils
-
获取标准setter方法的名字
- SOURCE_VERSION - 类中的静态变量 cn.wjybxx.apt.AptUtils
- SUPPRESS_UNCHECKED - 类中的静态变量 cn.wjybxx.apt.AptUtils
- SUPPRESS_UNCHECKED_RAWTYPES - 类中的静态变量 cn.wjybxx.apt.AptUtils
-
由于生成的代码不能很好的处理泛型等信息,因此需要抑制警告
T
- typeElement - 类中的变量 cn.wjybxx.apt.AbstractGenerator
-
要处理的类文件
- typeUtils - 类中的变量 cn.wjybxx.apt.AbstractGenerator
- typeUtils - 类中的变量 cn.wjybxx.apt.MyAbstractProcessor
U
- upwardToSuperTypeMirror(Types, TypeMirror, TypeMirror) - 类中的静态方法 cn.wjybxx.apt.AptUtils
-
将当前类型转型到目标超类型 用于获取当前类型传递给超类型的一些信息
W
- wjybxx.commons.aptbase - 模块 wjybxx.commons.aptbase
- writeToFile(Element, TypeSpec.Builder, String, Messager, Filer) - 类中的静态方法 cn.wjybxx.apt.AptUtils
- writeToFile(TypeElement, TypeSpec.Builder, Elements, Messager, Filer) - 类中的静态方法 cn.wjybxx.apt.AptUtils
所有程序包|所有类和接口