Package org.derive4j.processor
Class PatternMatchingDerivator
- java.lang.Object
-
- org.derive4j.processor.PatternMatchingDerivator
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
PatternMatchingDerivator.MatchingKind
-
Field Summary
Fields Modifier and Type Field Description private PatternMatchingDerivator.MatchingKind
matchingKind
private OtherwiseMatchingStepDerivator
otherwiseMatching
private PartialMatchingStepDerivator
partialMatching
private TotalMatchingStepDerivator
totalMatching
-
Constructor Summary
Constructors Constructor Description PatternMatchingDerivator(DeriveUtils deriveUtils, PatternMatchingDerivator.MatchingKind matchingKind)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static com.squareup.javapoet.FieldSpec
asFieldSpec(AlgebraicDataType adt)
(package private) static com.squareup.javapoet.ParameterSpec
asParameterSpec(AlgebraicDataType adt)
(package private) static com.squareup.javapoet.MethodSpec.Builder
constantMatchMethodBuilder(AlgebraicDataType adt, DataConstructor currentConstructor)
DeriveResult<DerivedCodeSpec>
derive(AlgebraicDataType adt)
(package private) static java.util.stream.Stream<javax.lang.model.type.TypeVariable>
matcherVariables(AlgebraicDataType adt)
-
-
-
Field Detail
-
matchingKind
private final PatternMatchingDerivator.MatchingKind matchingKind
-
totalMatching
private final TotalMatchingStepDerivator totalMatching
-
otherwiseMatching
private final OtherwiseMatchingStepDerivator otherwiseMatching
-
partialMatching
private final PartialMatchingStepDerivator partialMatching
-
-
Constructor Detail
-
PatternMatchingDerivator
PatternMatchingDerivator(DeriveUtils deriveUtils, PatternMatchingDerivator.MatchingKind matchingKind)
-
-
Method Detail
-
derive
public DeriveResult<DerivedCodeSpec> derive(AlgebraicDataType adt)
-
constantMatchMethodBuilder
static com.squareup.javapoet.MethodSpec.Builder constantMatchMethodBuilder(AlgebraicDataType adt, DataConstructor currentConstructor)
-
matcherVariables
static java.util.stream.Stream<javax.lang.model.type.TypeVariable> matcherVariables(AlgebraicDataType adt)
-
asParameterSpec
static com.squareup.javapoet.ParameterSpec asParameterSpec(AlgebraicDataType adt)
-
asFieldSpec
static com.squareup.javapoet.FieldSpec asFieldSpec(AlgebraicDataType adt)
-
-