Package org.tentackle.buildsupport
Class AnalyzeProcessor
java.lang.Object
javax.annotation.processing.AbstractProcessor
org.tentackle.buildsupport.AbstractTentackleProcessor
org.tentackle.buildsupport.AnalyzeProcessor
- All Implemented Interfaces:
Processor
@SupportedAnnotationTypes("*")
@SupportedOptions("verbosity")
public class AnalyzeProcessor
extends AbstractTentackleProcessor
Annotation Processor for all annotations annotated with
Analyze.- Author:
- harald
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringLogfile for compilation errors during the analyze-phase.
The logfile is missing, if no errors where detected.Fields inherited from class javax.annotation.processing.AbstractProcessor
processingEnv -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the generated analyze files directory.Gets the classloader to be used instead of the default.Gets the generated services resource directory.booleanprocess(Set<? extends TypeElement> annotationTypes, RoundEnvironment roundEnv) voidsetAnalyzeDir(File outputDir) Sets the generated analyze files directory.voidsetProcessingClassLoader(ClassLoader processingClassLoader) Sets the classloader to be used instead of the default.voidsetServiceDir(File serviceDir) Sets the generated services resource directory.Methods inherited from class org.tentackle.buildsupport.AbstractTentackleProcessor
cleanup, getProcessingEnvironment, getResourceManager, getResourceManagers, getSourceDir, getSupportedSourceVersion, init, isDebugLogging, isInfoLogging, setSourceDirMethods inherited from class javax.annotation.processing.AbstractProcessor
getCompletions, getSupportedAnnotationTypes, getSupportedOptions, isInitialized
-
Field Details
-
COMPILE_ERROR_LOG
Logfile for compilation errors during the analyze-phase.
The logfile is missing, if no errors where detected. Otherwise, analyze info files may be incomplete or missing.- See Also:
-
-
Constructor Details
-
AnalyzeProcessor
public AnalyzeProcessor()
-
-
Method Details
-
getProcessingClassLoader
Gets the classloader to be used instead of the default.- Returns:
- the classloader, never null (fallback to current classloader)
-
setProcessingClassLoader
Sets the classloader to be used instead of the default.- Parameters:
processingClassLoader- the classloader, null if default
-
getAnalyzeDir
Gets the generated analyze files directory.- Returns:
- the output dir
-
setAnalyzeDir
Sets the generated analyze files directory.- Parameters:
outputDir- the output dir
-
getServiceDir
Gets the generated services resource directory.- Returns:
- the resources file dir
-
setServiceDir
Sets the generated services resource directory.- Parameters:
serviceDir- the resource dir
-
process
Processes all annotations that itself or any inherited annotations are annotated with @Analyze. The recursive scan allows annotating only once for a group of annotations.
- Specified by:
processin interfaceProcessor- Specified by:
processin classAbstractProcessor
-