Package org.derive4j.processor
Class CataDerivator
java.lang.Object
org.derive4j.processor.CataDerivator
- All Implemented Interfaces:
Derivator
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate com.squareup.javapoet.TypeName
private DerivedCodeSpec
cataVisitor
(AlgebraicDataType adt, DeclaredType visitorType, List<DataConstructor> constructors) private DeclaredType
derive
(AlgebraicDataType adt) private DeriveResult
<DerivedCodeSpec> functionDispatchImpl
(AlgebraicDataType adt, List<DataConstructor> constructors) private static com.squareup.javapoet.NameAllocator
nameAllocator
(AlgebraicDataType adt, List<DataConstructor> constructors) private DeclaredType
strictCataType
(AlgebraicDataType adt, DeclaredType acceptedVisitorType) private DeriveResult
<DerivedCodeSpec> visitorDispatchImpl
(AlgebraicDataType adt, DeclaredType visitorType, List<DataConstructor> constructors) (package private) boolean
-
Field Details
-
utils
-
mapperDerivator
-
-
Constructor Details
-
CataDerivator
CataDerivator(DeriveUtils utils)
-
-
Method Details
-
derive
-
visitorIsObjectAlgebra
-
cataMapperTypeName
private com.squareup.javapoet.TypeName cataMapperTypeName(AlgebraicDataType adt, DataConstructor dc) -
functionDispatchImpl
private DeriveResult<DerivedCodeSpec> functionDispatchImpl(AlgebraicDataType adt, List<DataConstructor> constructors) -
strictCataType
-
delayType
-
cataVisitor
private DerivedCodeSpec cataVisitor(AlgebraicDataType adt, DeclaredType visitorType, List<DataConstructor> constructors) -
visitorDispatchImpl
private DeriveResult<DerivedCodeSpec> visitorDispatchImpl(AlgebraicDataType adt, DeclaredType visitorType, List<DataConstructor> constructors) -
nameAllocator
private static com.squareup.javapoet.NameAllocator nameAllocator(AlgebraicDataType adt, List<DataConstructor> constructors)
-