Class LilleroProcessor

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

    @SupportedAnnotationTypes({"ftbsc.lll.processor.annotations.Patch","ftbsc.lll.processor.annotations.BareInjector"})
    public class LilleroProcessor
    extends javax.annotation.processing.AbstractProcessor
    The actual annotation processor behind the magic. It (implicitly) implements the Processor interface by extending AbstractProcessor.
    • Field Summary

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

        processingEnv
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      ProcessorOptions getProcessorOptions()
      Returns the ProcessorOptions for this instance, creating the object if it hasn't been already.
      java.util.Set<java.lang.String> getSupportedOptions()
      Method overriding default implementation to manually pass supported options.
      javax.lang.model.SourceVersion getSupportedSourceVersion()
      Always returns the latest version since this should never break.
      boolean process​(java.util.Set<? extends javax.lang.model.element.TypeElement> annotations, javax.annotation.processing.RoundEnvironment roundEnv)
      Where the actual processing happens.
      • Methods inherited from class javax.annotation.processing.AbstractProcessor

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

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

      • LilleroProcessor

        public LilleroProcessor()
    • Method Detail

      • getSupportedOptions

        public java.util.Set<java.lang.String> getSupportedOptions()
        Method overriding default implementation to manually pass supported options.
        Specified by:
        getSupportedOptions in interface javax.annotation.processing.Processor
        Overrides:
        getSupportedOptions in class javax.annotation.processing.AbstractProcessor
        Returns:
        a Set of options supported by this processor.
      • getSupportedSourceVersion

        public javax.lang.model.SourceVersion getSupportedSourceVersion()
        Always returns the latest version since this should never break.
        Specified by:
        getSupportedSourceVersion in interface javax.annotation.processing.Processor
        Overrides:
        getSupportedSourceVersion in class javax.annotation.processing.AbstractProcessor
        Returns:
        the latest version
      • process

        public boolean process​(java.util.Set<? extends javax.lang.model.element.TypeElement> annotations,
                               javax.annotation.processing.RoundEnvironment roundEnv)
        Where the actual processing happens. It filters through whatever annotated class it's fed, and checks whether it contains the required information. It then generates injectors and a service provider for every remaining class.
        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
        roundEnv - environment for information about the current and prior round
        Returns:
        whether or not the set of annotation types are claimed by this processor
        See Also:
        isValidInjector(TypeElement)