Class AbstractTentackleProcessor

  • All Implemented Interfaces:
    javax.annotation.processing.Processor
    Direct Known Subclasses:
    AnalyzeProcessor

    public abstract class AbstractTentackleProcessor
    extends javax.annotation.processing.AbstractProcessor
    Abstract tentackle annotation processor.

    In order to avoid warnings, annotation processors should be annotated with @SupportedOptions("verbosity").

    Author:
    harald
    • Field Summary

      • Fields inherited from class javax.annotation.processing.AbstractProcessor

        processingEnv
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void cleanup()
      Closes the resource- and source-manager.
      javax.annotation.processing.ProcessingEnvironment getProcessingEnvironment()
      Gets the processing environment.
      ResourceManager getResourceManager​(java.io.File directory)
      Gets a resource manager.
      java.util.Collection<ResourceManager> getResourceManagers()
      Gets the resource managers.
      java.io.File getSourceDir()
      Gets the source directory.
      void init​(javax.annotation.processing.ProcessingEnvironment processingEnv)  
      boolean isDebugLogging()
      Gets whether to log debug messages.
      boolean isInfoLogging()
      Gets whether to log info messages.
      void setSourceDir​(java.io.File sourceDir)
      Sets the source directory.
      • Methods inherited from class javax.annotation.processing.AbstractProcessor

        getCompletions, getSupportedAnnotationTypes, getSupportedOptions, getSupportedSourceVersion, isInitialized, process
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractTentackleProcessor

        public AbstractTentackleProcessor()
        Creates an annotation processor.
    • Method Detail

      • init

        public void init​(javax.annotation.processing.ProcessingEnvironment processingEnv)
        Specified by:
        init in interface javax.annotation.processing.Processor
        Overrides:
        init in class javax.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.IOException
        Closes 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