Package org.derive4j.processor
Class OtherwiseMatchingStepDerivator
- java.lang.Object
-
- org.derive4j.processor.OtherwiseMatchingStepDerivator
-
class OtherwiseMatchingStepDerivator extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private DeriveUtils
deriveUtils
private MapperDerivator
mapperDerivator
private PatternMatchingDerivator.MatchingKind
matchingKind
-
Constructor Summary
Constructors Constructor Description OtherwiseMatchingStepDerivator(DeriveUtils deriveUtils, PatternMatchingDerivator.MatchingKind matchingKind)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private com.squareup.javapoet.CodeBlock
functionsDispatchEitherImpl(javax.lang.model.element.TypeElement f0, EitherModel eitherModel, com.squareup.javapoet.TypeName eitherTypeName, AlgebraicDataType adt, java.util.List<DataConstructor> constructors, java.lang.String argName)
private com.squareup.javapoet.CodeBlock
functionsDispatchImpl(javax.lang.model.element.TypeElement f0, AlgebraicDataType adt, java.util.List<DataConstructor> constructors)
private com.squareup.javapoet.CodeBlock
functionsDispatchOptionImpl(OptionModel optionModel, AlgebraicDataType adt, java.util.List<DataConstructor> constructors)
(package private) static java.lang.String
otherwiseBuilderClassName()
private java.util.List<com.squareup.javapoet.MethodSpec>
otherwiseLeftMethod(AlgebraicDataType adt, EitherModel eitherModel)
(package private) static com.squareup.javapoet.ParameterizedTypeName
otherwiseMatcherTypeName(AlgebraicDataType adt)
private java.util.List<com.squareup.javapoet.MethodSpec>
otherwiseMethods(AlgebraicDataType adt)
private com.squareup.javapoet.MethodSpec
otherwiseNoneMethod(AlgebraicDataType adt)
(package private) com.squareup.javapoet.TypeSpec
stepTypeSpec(AlgebraicDataType adt)
private com.squareup.javapoet.CodeBlock
visitorDispatchEitherImpl(javax.lang.model.element.TypeElement f0, EitherModel eitherModel, com.squareup.javapoet.TypeName eitherTypeName, AlgebraicDataType adt, javax.lang.model.type.DeclaredType visitorType, javax.lang.model.element.VariableElement visitorParam, java.lang.String argName)
private com.squareup.javapoet.CodeBlock
visitorDispatchImpl(javax.lang.model.element.TypeElement f0, AlgebraicDataType adt, javax.lang.model.type.DeclaredType visitorType, javax.lang.model.element.VariableElement visitorParam)
private com.squareup.javapoet.CodeBlock
visitorDispatchOptionImpl(OptionModel optionModel, AlgebraicDataType adt, javax.lang.model.type.DeclaredType visitorType, javax.lang.model.element.VariableElement visitorParam)
-
-
-
Field Detail
-
deriveUtils
private final DeriveUtils deriveUtils
-
mapperDerivator
private final MapperDerivator mapperDerivator
-
matchingKind
private final PatternMatchingDerivator.MatchingKind matchingKind
-
-
Constructor Detail
-
OtherwiseMatchingStepDerivator
OtherwiseMatchingStepDerivator(DeriveUtils deriveUtils, PatternMatchingDerivator.MatchingKind matchingKind)
-
-
Method Detail
-
stepTypeSpec
com.squareup.javapoet.TypeSpec stepTypeSpec(AlgebraicDataType adt)
-
otherwiseLeftMethod
private java.util.List<com.squareup.javapoet.MethodSpec> otherwiseLeftMethod(AlgebraicDataType adt, EitherModel eitherModel)
-
functionsDispatchEitherImpl
private com.squareup.javapoet.CodeBlock functionsDispatchEitherImpl(javax.lang.model.element.TypeElement f0, EitherModel eitherModel, com.squareup.javapoet.TypeName eitherTypeName, AlgebraicDataType adt, java.util.List<DataConstructor> constructors, java.lang.String argName)
-
visitorDispatchEitherImpl
private com.squareup.javapoet.CodeBlock visitorDispatchEitherImpl(javax.lang.model.element.TypeElement f0, EitherModel eitherModel, com.squareup.javapoet.TypeName eitherTypeName, AlgebraicDataType adt, javax.lang.model.type.DeclaredType visitorType, javax.lang.model.element.VariableElement visitorParam, java.lang.String argName)
-
functionsDispatchOptionImpl
private com.squareup.javapoet.CodeBlock functionsDispatchOptionImpl(OptionModel optionModel, AlgebraicDataType adt, java.util.List<DataConstructor> constructors)
-
visitorDispatchOptionImpl
private com.squareup.javapoet.CodeBlock visitorDispatchOptionImpl(OptionModel optionModel, AlgebraicDataType adt, javax.lang.model.type.DeclaredType visitorType, javax.lang.model.element.VariableElement visitorParam)
-
otherwiseMethods
private java.util.List<com.squareup.javapoet.MethodSpec> otherwiseMethods(AlgebraicDataType adt)
-
otherwiseNoneMethod
private com.squareup.javapoet.MethodSpec otherwiseNoneMethod(AlgebraicDataType adt)
-
functionsDispatchImpl
private com.squareup.javapoet.CodeBlock functionsDispatchImpl(javax.lang.model.element.TypeElement f0, AlgebraicDataType adt, java.util.List<DataConstructor> constructors)
-
visitorDispatchImpl
private com.squareup.javapoet.CodeBlock visitorDispatchImpl(javax.lang.model.element.TypeElement f0, AlgebraicDataType adt, javax.lang.model.type.DeclaredType visitorType, javax.lang.model.element.VariableElement visitorParam)
-
otherwiseMatcherTypeName
static com.squareup.javapoet.ParameterizedTypeName otherwiseMatcherTypeName(AlgebraicDataType adt)
-
otherwiseBuilderClassName
static java.lang.String otherwiseBuilderClassName()
-
-