Class AbstractGenerator

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private ToolLogger logger  
      (package private) javax.annotation.processing.ProcessingEnvironment processingEnv  
    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractGenerator​(javax.annotation.processing.ProcessingEnvironment processingEnv)
      Constructs a new processor.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getName()
      Returns the name of the processor.
      java.util.Set<java.lang.String> getSupportedOptions()
      Returns the supported options set.
      (package private) ToolLogger logger()
      Returns the logger to log messages with.
      abstract void processTypeElement​(javax.lang.model.element.TypeElement annotation, javax.lang.model.element.TypeElement element, MessageInterface messageInterface)
      Processes a type element.
      • Methods inherited from class java.lang.Object

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

      • processingEnv

        final javax.annotation.processing.ProcessingEnvironment processingEnv
    • Constructor Detail

      • AbstractGenerator

        AbstractGenerator​(javax.annotation.processing.ProcessingEnvironment processingEnv)
        Constructs a new processor.
        Parameters:
        processingEnv - the processing environment.
    • Method Detail

      • processTypeElement

        public abstract void processTypeElement​(javax.lang.model.element.TypeElement annotation,
                                                javax.lang.model.element.TypeElement element,
                                                MessageInterface messageInterface)
        Processes a type element.
        Parameters:
        annotation - the annotation who trigger the processing
        element - the element that contains the methods.
        messageInterface - the message interface to implement.
      • logger

        final ToolLogger logger()
        Returns the logger to log messages with.
        Returns:
        the logger to log messages with.
      • getName

        public final java.lang.String getName()
        Returns the name of the processor.
        Returns:
        the name of the processor.
      • getSupportedOptions

        public final java.util.Set<java.lang.String> getSupportedOptions()
        Returns the supported options set.
        Returns:
        the supported options set or empty set if none