Class RouteCartographer

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

    @SupportedSourceVersion(RELEASE_8)
    public class RouteCartographer
    extends javax.annotation.processing.AbstractProcessor
    The main processor class.
    • Field Summary

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

        processingEnv
    • Constructor Summary

      Constructors 
      Constructor Description
      RouteCartographer()
      Default constructor, it only initialises annotationClasses.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Set<java.lang.String> getSupportedAnnotationTypes()  
      boolean process​(java.util.Set<? extends javax.lang.model.element.TypeElement> annotations, javax.annotation.processing.RoundEnvironment env)
      Processes Spring's annotations, NOT claiming them for itself.
      • Methods inherited from class javax.annotation.processing.AbstractProcessor

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

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

      • RouteCartographer

        public RouteCartographer()
        Default constructor, it only initialises annotationClasses.
    • Method Detail

      • process

        public boolean process​(java.util.Set<? extends javax.lang.model.element.TypeElement> annotations,
                               javax.annotation.processing.RoundEnvironment env)
        Processes Spring's annotations, NOT claiming them for itself. It builds a Route object for each route and adds it to foundRoutes, then proceeds to print it to a file.
        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:
        false, letting other processor process the annotations again
      • getSupportedAnnotationTypes

        public java.util.Set<java.lang.String> getSupportedAnnotationTypes()
        Specified by:
        getSupportedAnnotationTypes in interface javax.annotation.processing.Processor
        Overrides:
        getSupportedAnnotationTypes in class javax.annotation.processing.AbstractProcessor
        Returns:
        the types of annotations supported by this processor