Class Processor
- java.lang.Object
-
- javax.annotation.processing.AbstractProcessor
-
- org.inferred.freebuilder.processor.Processor
-
- All Implemented Interfaces:
javax.annotation.processing.Processor
@AutoService(javax.annotation.processing.Processor.class) public class Processor extends javax.annotation.processing.AbstractProcessorProcessor for the @FreeBuilderannotation.Processing is split into analysis (owned by the
Analyser) and code generation (owned by theGeneratedBuilder), for testability.
-
-
Field Summary
Fields Modifier and Type Field Description private Analyseranalyserprivate FeatureSetfeaturesprivate static java.util.concurrent.ConcurrentMap<javax.annotation.processing.ProcessingEnvironment,Processor>registeredProcessorsKeep track of which processors have been registered to avoid double-processing if FreeBuilder ends up on the processor path twice.
-
Constructor Summary
Constructors Constructor Description Processor()Processor(FeatureSet features)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.util.Set<java.lang.String>getSupportedAnnotationTypes()javax.lang.model.SourceVersiongetSupportedSourceVersion()inthashCode()voidinit(javax.annotation.processing.ProcessingEnvironment processingEnv)booleanprocess(java.util.Set<? extends javax.lang.model.element.TypeElement> annotations, javax.annotation.processing.RoundEnvironment roundEnv)
-
-
-
Field Detail
-
registeredProcessors
private static final java.util.concurrent.ConcurrentMap<javax.annotation.processing.ProcessingEnvironment,Processor> registeredProcessors
Keep track of which processors have been registered to avoid double-processing if FreeBuilder ends up on the processor path twice. While we catch the resulting Filer exceptions and convert them to warnings, it's still cleaner to issue a single NOTE-severity message.
-
analyser
private Analyser analyser
-
features
private final FeatureSet features
-
-
Constructor Detail
-
Processor
public Processor()
-
Processor
public Processor(FeatureSet features)
-
-
Method Detail
-
getSupportedAnnotationTypes
public java.util.Set<java.lang.String> getSupportedAnnotationTypes()
- Specified by:
getSupportedAnnotationTypesin interfacejavax.annotation.processing.Processor- Overrides:
getSupportedAnnotationTypesin classjavax.annotation.processing.AbstractProcessor
-
getSupportedSourceVersion
public javax.lang.model.SourceVersion getSupportedSourceVersion()
- Specified by:
getSupportedSourceVersionin interfacejavax.annotation.processing.Processor- Overrides:
getSupportedSourceVersionin classjavax.annotation.processing.AbstractProcessor
-
init
public void init(javax.annotation.processing.ProcessingEnvironment processingEnv)
- Specified by:
initin interfacejavax.annotation.processing.Processor- Overrides:
initin classjavax.annotation.processing.AbstractProcessor
-
process
public boolean process(java.util.Set<? extends javax.lang.model.element.TypeElement> annotations, javax.annotation.processing.RoundEnvironment roundEnv)- Specified by:
processin interfacejavax.annotation.processing.Processor- Specified by:
processin classjavax.annotation.processing.AbstractProcessor
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-