Package io.vavr.match
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 javax.annotation.processing.AbstractProcessor
processingEnv
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate String
deriveClassName
(ClassModel classModel) private void
generate
(Set<ClassModel> classModels) boolean
process
(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 javax.annotation.processing.AbstractProcessor
getCompletions, getSupportedOptions, init, isInitialized
-
Constructor Details
-
PatternsProcessor
public PatternsProcessor()
-
-
Method Details
-
getSupportedAnnotationTypes
- Specified by:
getSupportedAnnotationTypes
in interfaceProcessor
- Overrides:
getSupportedAnnotationTypes
in classAbstractProcessor
-
getSupportedSourceVersion
- Specified by:
getSupportedSourceVersion
in interfaceProcessor
- Overrides:
getSupportedSourceVersion
in classAbstractProcessor
-
process
Gathers annotated elements, transforms elements to a generator model and generates the model to code.- Specified by:
process
in interfaceProcessor
- Specified by:
process
in 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
-