Class CodeGenAnnotationProcessor
java.lang.Object
javax.annotation.processing.AbstractProcessor
net.binis.codegen.annotation.processor.CodeGenAnnotationProcessor
- All Implemented Interfaces:
Processor
@AutoService(javax.annotation.processing.Processor.class)
public class CodeGenAnnotationProcessor
extends AbstractProcessor
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<net.binis.codegen.discovery.Discoverer.DiscoveredService>protected Elementsprotected JavaFileManagerprotected Filerprotected Messagerprotected Fileprotected TypesFields inherited from class javax.annotation.processing.AbstractProcessor
processingEnv -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static StringcalcAnnotationName(Object annotation) protected FileclassNameToFile(String root, String className) protected voidprotected voidexternalLookup(RoundEnvironment roundEnv) protected static ElementfindClassType(Element type) protected static StringgetBasePath(net.binis.codegen.generation.core.interfaces.PrototypeData properties, boolean implementation) protected JavaFileManagergetFileManager(ProcessingEnvironment processingEnv) protected ObjectgetSourceFile(Element element) voidinit(ProcessingEnvironment processingEnv) booleanprocess(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) protected voidprocessAnnotation(RoundEnvironment roundEnv, net.binis.codegen.generation.core.Parsables files, Class<? extends Annotation> cls, List<Element> elements) protected voidprocessConfigs(RoundEnvironment roundEnv) protected booleanprotected voidprocessTemplates(RoundEnvironment roundEnv, net.binis.codegen.generation.core.Parsables files) protected static StringreadElementSource(Element eType, Object annotation, net.binis.codegen.tools.Holder<String> fileName) protected voidprotected voidsaveParsed(net.binis.codegen.generation.core.interfaces.PrototypeDescription<com.github.javaparser.ast.body.ClassOrInterfaceDeclaration> p) Methods inherited from class javax.annotation.processing.AbstractProcessor
getCompletions, getSupportedOptions, isInitialized
-
Field Details
-
typeUtils
-
elementUtils
-
filer
-
messager
-
options
-
discovered
-
fileManager
-
targetDir
-
sourceRoots
-
-
Constructor Details
-
CodeGenAnnotationProcessor
public CodeGenAnnotationProcessor()
-
-
Method Details
-
init
- Specified by:
initin interfaceProcessor- Overrides:
initin classAbstractProcessor
-
getFileManager
-
process
- Specified by:
processin interfaceProcessor- Specified by:
processin classAbstractProcessor
-
saveParsed
protected void saveParsed(net.binis.codegen.generation.core.interfaces.PrototypeDescription<com.github.javaparser.ast.body.ClassOrInterfaceDeclaration> p) -
processTemplates
protected void processTemplates(RoundEnvironment roundEnv, net.binis.codegen.generation.core.Parsables files) -
processConfigs
-
processed
protected boolean processed() -
externalLookup
-
classNameToFile
-
getSourceFile
-
processAnnotation
protected void processAnnotation(RoundEnvironment roundEnv, net.binis.codegen.generation.core.Parsables files, Class<? extends Annotation> cls, List<Element> elements) -
readElementSource
-
calcAnnotationName
-
findClassType
-
saveFile
-
getBasePath
protected static String getBasePath(net.binis.codegen.generation.core.interfaces.PrototypeData properties, boolean implementation) -
getSupportedSourceVersion
- Specified by:
getSupportedSourceVersionin interfaceProcessor- Overrides:
getSupportedSourceVersionin classAbstractProcessor
-
getSupportedAnnotationTypes
- Specified by:
getSupportedAnnotationTypesin interfaceProcessor- Overrides:
getSupportedAnnotationTypesin classAbstractProcessor
-
error
-