-
Notifications
You must be signed in to change notification settings - Fork 1
AnnotationProcessing_Advanced
Ladislav Gazo edited this page Aug 29, 2015
·
1 revision
Collect the common PAP cases here:
TypeElement typeElement = ...;
for (TypeMirror field: ElementFilter.fieldsIn(type.getEnclosedElements()) {
//... process field
}
MutableProcessingEnvironment processingEnv = ...; //defined in the MutableAnnotationProcessor
TypeMirror type = ...;
MutableTypeMirror mutableType = processingEnv.getTypeUtils().toMutable(type);
MutableProcessingEnvironment processingEnv = ...;
MutableTypeMirror mutableType = ...;
mutableType.setSuperClass(processingEnv.getTypeUtils().toMutable(BufferedReader.class));
MutableProcessingEnvironment processingEnv = ...;
MutableTypeMirror mutableType = ...;
mutableType.setSuperClass(processingEnv.getTypeUtils().toMutable(List.class));