Class PatternsProcessor
java.lang.Object
javax.annotation.processing.AbstractProcessor
io.vavr.match.PatternsProcessor
- All Implemented Interfaces:
Processor
A code generator for Vavr structural pattern matching patterns.
Note:
If javac complains [WARNING] No processor claimed any of these annotations: ...
we need to provide the compiler arg -Xlint:-processing.
See JDK-6999068 bug.
-
Field Summary
Fields inherited from class AbstractProcessor
processingEnv -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate StringderiveClassName(ClassModel classModel) private voidgenerate(Set<ClassModel> classModels) booleanprocess(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) Gathers annotated elements, transforms elements to a generator model and generates the model to code.private Set<ClassModel> transform(Set<TypeElement> typeElements) Methods inherited from class AbstractProcessor
getCompletions, getSupportedOptions, init, isInitialized
-
Constructor Details
-
PatternsProcessor
public PatternsProcessor()
-
-
Method Details
-
getSupportedAnnotationTypes
- Specified by:
getSupportedAnnotationTypesin interfaceProcessor- Overrides:
getSupportedAnnotationTypesin classAbstractProcessor
-
getSupportedSourceVersion
- Specified by:
getSupportedSourceVersionin interfaceProcessor- Overrides:
getSupportedSourceVersionin classAbstractProcessor
-
process
Gathers annotated elements, transforms elements to a generator model and generates the model to code.- Specified by:
processin interfaceProcessor- Specified by:
processin classAbstractProcessor- 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
-
transform
-
generate
-
deriveClassName
-