Class FunctionManifestProcessor

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

    @SupportedOptions("title")
    @SupportedSourceVersion(RELEASE_11)
    @SupportedAnnotationTypes({"io.virtdata.annotations.ThreadSafeMapper","io.virtdata.annotations.PerThreadMapper"})
    public class FunctionManifestProcessor
    extends javax.annotation.processing.AbstractProcessor
    This annotation processor is responsible for finding all annotated functions and adding them to the manifest file for the current project. Specifically, any class annotated as ThreadSafeMapper or PerThreadMapper are recorded in
    classes/META-INF/functions
    This operates slightly differently than the service loader facility. The point is to enumerate candidate functions without requiring them to have a no-args constructor.
    • Field Summary

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

        processingEnv
    • Method Summary

      Modifier and Type Method Description
      void init​(javax.annotation.processing.ProcessingEnvironment processingEnv)  
      boolean process​(java.util.Set<? extends javax.lang.model.element.TypeElement> annotations, javax.annotation.processing.RoundEnvironment roundEnv)  
      • Methods inherited from class javax.annotation.processing.AbstractProcessor

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

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

      • FunctionManifestProcessor

        public FunctionManifestProcessor()
    • 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
      • process

        public boolean process​(java.util.Set<? extends javax.lang.model.element.TypeElement> annotations,
                               javax.annotation.processing.RoundEnvironment roundEnv)
        Specified by:
        process in interface javax.annotation.processing.Processor
        Specified by:
        process in class javax.annotation.processing.AbstractProcessor