Package org.tentackle.buildsupport
Class AbstractTentackleProcessor
- java.lang.Object
-
- javax.annotation.processing.AbstractProcessor
-
- org.tentackle.buildsupport.AbstractTentackleProcessor
-
- All Implemented Interfaces:
javax.annotation.processing.Processor
- Direct Known Subclasses:
AnalyzeProcessor
public abstract class AbstractTentackleProcessor extends javax.annotation.processing.AbstractProcessorAbstract tentackle annotation processor.In order to avoid warnings, annotation processors should be annotated with
@SupportedOptions("verbosity").- Author:
- harald
-
-
Constructor Summary
Constructors Constructor Description AbstractTentackleProcessor()Creates an annotation processor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcleanup()Closes the resource- and source-manager.javax.annotation.processing.ProcessingEnvironmentgetProcessingEnvironment()Gets the processing environment.ResourceManagergetResourceManager(java.io.File directory)Gets a resource manager.java.util.Collection<ResourceManager>getResourceManagers()Gets the resource managers.java.io.FilegetSourceDir()Gets the source directory.voidinit(javax.annotation.processing.ProcessingEnvironment processingEnv)booleanisDebugLogging()Gets whether to log debug messages.booleanisInfoLogging()Gets whether to log info messages.voidsetSourceDir(java.io.File sourceDir)Sets the source directory.
-
-
-
Method Detail
-
init
public void init(javax.annotation.processing.ProcessingEnvironment processingEnv)
- Specified by:
initin interfacejavax.annotation.processing.Processor- Overrides:
initin classjavax.annotation.processing.AbstractProcessor
-
isInfoLogging
public boolean isInfoLogging()
Gets whether to log info messages.- Returns:
- true if info logging
-
isDebugLogging
public boolean isDebugLogging()
Gets whether to log debug messages.- Returns:
- true if debug logging
-
getResourceManager
public ResourceManager getResourceManager(java.io.File directory)
Gets a resource manager.- Parameters:
directory- the base directory- Returns:
- the resource manager
-
getResourceManagers
public java.util.Collection<ResourceManager> getResourceManagers()
Gets the resource managers.- Returns:
- the resource managers, never null
-
cleanup
public void cleanup() throws java.io.IOExceptionCloses the resource- and source-manager.- Throws:
java.io.IOException- if cleanup failed
-
getProcessingEnvironment
public javax.annotation.processing.ProcessingEnvironment getProcessingEnvironment()
Gets the processing environment.- Returns:
- the processing environment
-
getSourceDir
public java.io.File getSourceDir()
Gets the source directory.- Returns:
- the source file dir
-
setSourceDir
public void setSourceDir(java.io.File sourceDir)
Sets the source directory.- Parameters:
sourceDir- the source dir
-
-