Class GEBProcessor

  • All Implemented Interfaces:
    javax.annotation.processing.Processor

    @SupportedAnnotationTypes("ftbsc.geb.api.annotations.Listen")
    public class GEBProcessor
    extends javax.annotation.processing.AbstractProcessor
    GEB's annotation processor, which takes care of generating the dispatchers.
    • Field Summary

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

        processingEnv
    • Constructor Summary

      Constructors 
      Constructor Description
      GEBProcessor()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      javax.lang.model.SourceVersion getSupportedSourceVersion()
      Sets the supported source version to the latest one.
      void init​(javax.annotation.processing.ProcessingEnvironment env)
      Initializes the processor with the given environment.
      boolean process​(java.util.Set<? extends javax.lang.model.element.TypeElement> annotations, javax.annotation.processing.RoundEnvironment env)
      The starting point of the processor.
      • Methods inherited from class javax.annotation.processing.AbstractProcessor

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

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

      • GEBProcessor

        public GEBProcessor()
    • Method Detail

      • init

        public void init​(javax.annotation.processing.ProcessingEnvironment env)
        Initializes the processor with the given environment. Also takes carae of initializing the TypeMirror "constants" for later use.
        Specified by:
        init in interface javax.annotation.processing.Processor
        Overrides:
        init in class javax.annotation.processing.AbstractProcessor
        Parameters:
        env - the environment
      • process

        public boolean process​(java.util.Set<? extends javax.lang.model.element.TypeElement> annotations,
                               javax.annotation.processing.RoundEnvironment env)
        The starting point of the processor. It calls processListener(Element) on all elements annotated with the Listen annotation.
        Specified by:
        process in interface javax.annotation.processing.Processor
        Specified by:
        process in class javax.annotation.processing.AbstractProcessor
        Parameters:
        annotations - the annotation types requested to be processed
        env - environment for information about the current and prior round
        Returns:
        whether the set of annotation types are claimed by this processor
      • getSupportedSourceVersion

        public javax.lang.model.SourceVersion getSupportedSourceVersion()
        Sets the supported source version to the latest one. It's either that or constant warnings, and the processor is simple enough.
        Specified by:
        getSupportedSourceVersion in interface javax.annotation.processing.Processor
        Overrides:
        getSupportedSourceVersion in class javax.annotation.processing.AbstractProcessor
        Returns:
        the latest source version