Package ftbsc.lll.processor
Class LilleroProcessor
- java.lang.Object
-
- javax.annotation.processing.AbstractProcessor
-
- ftbsc.lll.processor.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 theProcessor
interface by extendingAbstractProcessor
.
-
-
Constructor Summary
Constructors Constructor Description LilleroProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProcessorOptions
getProcessorOptions()
Returns theProcessorOptions
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.
-
-
-
Method Detail
-
getSupportedOptions
public java.util.Set<java.lang.String> getSupportedOptions()
Method overriding default implementation to manually pass supported options.- Specified by:
getSupportedOptions
in interfacejavax.annotation.processing.Processor
- Overrides:
getSupportedOptions
in classjavax.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 interfacejavax.annotation.processing.Processor
- Overrides:
getSupportedSourceVersion
in classjavax.annotation.processing.AbstractProcessor
- Returns:
- the latest version
-
getProcessorOptions
public ProcessorOptions getProcessorOptions()
Returns theProcessorOptions
for this instance, creating the object if it hasn't been already.- Returns:
- the
ProcessorOptions
for this instance
-
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 interfacejavax.annotation.processing.Processor
- Specified by:
process
in classjavax.annotation.processing.AbstractProcessor
- Parameters:
annotations
- the annotation types requested to be processedroundEnv
- 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)
-
-