Top Description Constructors Methods
io.vavr.match.generator

public Class Generator

extends Object
Class Inheritance
Imports
io.vavr.match.annotation.Unapply, io.vavr.match.model.ClassModel, .MethodModel, .TypeParameterModel, java.util.ArrayList, .HashSet, .List, .Set, java.util.stream.IntStream

Code generator for structural pattern matching patterns.
Author
Daniel Dietrich

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static List<String>
deriveUpperBounds(List<String> typeArgs, int count)

public static String
generate(String derivedClassName, ClassModel classModel)

private static String
generate(ImportManager im, ClassModel classModel, List<MethodModel> methodModels)

private static void
generate(ImportManager im, ClassModel classModel, MethodModel methodModel, StringBuilder builder)

private static String
genGenerics(ImportManager im, MethodModel methodModel, List<String> typeParameters, List<String> upperBoundArgs)

private static String
genParams(ImportManager im, List<String> upperBoundArgs, int arity)

private static String
genReturnType(ImportManager im, MethodModel methodModel, List<String> upperBoundArgs, int arity)

private static String
mapToName(ImportManager im, TypeParameterModel typeParameterModel)

private static String
private static String
pattern(ImportManager im, int arity)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Generatorback to summary
private Generator()

Method Detail

deriveUpperBoundsback to summary
private static List<String> deriveUpperBounds(List<String> typeArgs, int count)
generateback to summary
public static String generate(String derivedClassName, ClassModel classModel)
generateback to summary
private static String generate(ImportManager im, ClassModel classModel, List<MethodModel> methodModels)
generateback to summary
private static void generate(ImportManager im, ClassModel classModel, MethodModel methodModel, StringBuilder builder)
genGenericsback to summary
private static String genGenerics(ImportManager im, MethodModel methodModel, List<String> typeParameters, List<String> upperBoundArgs)
genParamsback to summary
private static String genParams(ImportManager im, List<String> upperBoundArgs, int arity)
genReturnTypeback to summary
private static String genReturnType(ImportManager im, MethodModel methodModel, List<String> upperBoundArgs, int arity)
mapToNameback to summary
private static String mapToName(ImportManager im, TypeParameterModel typeParameterModel)
mapToNameback to summary
private static String mapToName(ImportManager im, ClassModel classModel)
patternback to summary
private static String pattern(ImportManager im, int arity)