Class Generator
java.lang.Object
io.vavr.match.generator.Generator
Code generator for structural pattern matching patterns.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionderiveUpperBounds(List<String> typeArgs, int count) private static voidgenerate(ImportManager im, ClassModel classModel, MethodModel methodModel, StringBuilder builder) private static Stringgenerate(ImportManager im, ClassModel classModel, List<MethodModel> methodModels) static Stringgenerate(String derivedClassName, ClassModel classModel) private static StringgenGenerics(ImportManager im, MethodModel methodModel, List<String> typeParameters, List<String> upperBoundArgs) private static StringgenParams(ImportManager im, List<String> upperBoundArgs, int arity) private static StringgenReturnType(ImportManager im, MethodModel methodModel, List<String> upperBoundArgs, int arity) private static StringmapToName(ImportManager im, ClassModel classModel) private static StringmapToName(ImportManager im, TypeParameterModel typeParameterModel) private static Stringpattern(ImportManager im, int arity)
-
Constructor Details
-
Generator
private Generator()
-
-
Method Details
-
generate
-
generate
private static String generate(ImportManager im, ClassModel classModel, List<MethodModel> methodModels) -
generate
private static void generate(ImportManager im, ClassModel classModel, MethodModel methodModel, StringBuilder builder) -
deriveUpperBounds
-
genGenerics
private static String genGenerics(ImportManager im, MethodModel methodModel, List<String> typeParameters, List<String> upperBoundArgs) -
genReturnType
private static String genReturnType(ImportManager im, MethodModel methodModel, List<String> upperBoundArgs, int arity) -
genParams
-
mapToName
-
mapToName
-
pattern
-