Package org.tentackle.buildsupport
Class AnalyzeProcessor
- java.lang.Object
-
- javax.annotation.processing.AbstractProcessor
-
- org.tentackle.buildsupport.AbstractTentackleProcessor
-
- org.tentackle.buildsupport.AnalyzeProcessor
-
- All Implemented Interfaces:
javax.annotation.processing.Processor
@SupportedAnnotationTypes("*") @SupportedSourceVersion(RELEASE_11) @SupportedOptions("verbosity") public class AnalyzeProcessor extends AbstractTentackleProcessorAnnotation Processor for all annotations annotated withAnalyze.- Author:
- harald
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCOMPILE_ERROR_LOGLogfile for compilation errors during the analyze phase.
The logfile is missing, if no errors where detected.
-
Constructor Summary
Constructors Constructor Description AnalyzeProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.FilegetAnalyzeDir()Gets the generated analyze files directory.java.lang.ClassLoadergetProcessingClassLoader()Gets the classloader to be used instead of the default.java.io.FilegetServiceDir()Gets the generated services resource directory.booleanprocess(java.util.Set<? extends javax.lang.model.element.TypeElement> annotationTypes, javax.annotation.processing.RoundEnvironment roundEnv)voidsetAnalyzeDir(java.io.File outputDir)Sets the generated analyze files directory.voidsetProcessingClassLoader(java.lang.ClassLoader processingClassLoader)Sets the classloader to be used instead of the default.voidsetServiceDir(java.io.File serviceDir)Sets the generated services resource directory.-
Methods inherited from class org.tentackle.buildsupport.AbstractTentackleProcessor
cleanup, getProcessingEnvironment, getResourceManager, getResourceManagers, getSourceDir, init, isDebugLogging, isInfoLogging, setSourceDir
-
-
-
-
Field Detail
-
COMPILE_ERROR_LOG
public static final java.lang.String 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:
- Constant Field Values
-
-
Method Detail
-
getProcessingClassLoader
public java.lang.ClassLoader getProcessingClassLoader()
Gets the classloader to be used instead of the default.- Returns:
- the classloader, never null (fallback to current classloader)
-
setProcessingClassLoader
public void setProcessingClassLoader(java.lang.ClassLoader processingClassLoader)
Sets the classloader to be used instead of the default.- Parameters:
processingClassLoader- the classloader, null if default
-
getAnalyzeDir
public java.io.File getAnalyzeDir()
Gets the generated analyze files directory.- Returns:
- the output dir
-
setAnalyzeDir
public void setAnalyzeDir(java.io.File outputDir)
Sets the generated analyze files directory.- Parameters:
outputDir- the output dir
-
getServiceDir
public java.io.File getServiceDir()
Gets the generated services resource directory.- Returns:
- the resources file dir
-
setServiceDir
public void setServiceDir(java.io.File serviceDir)
Sets the generated services resource directory.- Parameters:
serviceDir- the resource dir
-
process
public boolean process(java.util.Set<? extends javax.lang.model.element.TypeElement> annotationTypes, javax.annotation.processing.RoundEnvironment roundEnv)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 interfacejavax.annotation.processing.Processor- Specified by:
processin classjavax.annotation.processing.AbstractProcessor
-
-