Class DataTypeExtractor
java.lang.Object
org.apache.flink.table.types.extraction.DataTypeExtractor
-
Method Summary
Modifier and TypeMethodDescriptionstatic DataTypeextractFromGeneric(DataTypeFactory typeFactory, Class<?> baseClass, int genericPos, Type contextType) Extracts a data type from a type variable atgenericPosofbaseClassusing the information of the most specific typecontextType.static DataTypeextractFromGenericMethodParameter(DataTypeFactory typeFactory, Class<?> baseClass, Method method, int paramPos, int genericPos) Extracts a data type from a method parameter by considering surrounding classes and parameter annotation.static DataTypeextractFromMethodParameter(DataTypeFactory typeFactory, Class<?> baseClass, Method method, int paramPos) Extracts a data type from a method parameter by considering surrounding classes and parameter annotation.static DataTypeextractFromMethodReturnType(DataTypeFactory typeFactory, Class<?> baseClass, Method method) Extracts a data type from a method return type by considering surrounding classes and method annotation.static DataTypeextractFromMethodReturnType(DataTypeFactory typeFactory, Class<?> baseClass, Method method, Type methodReturnType) Extracts a data type from a method return type with specifying the method's type explicitly by considering surrounding classes and method annotation.static DataTypeextractFromType(DataTypeFactory typeFactory, Type type) Extracts a data type from a type without considering surrounding classes or templates.static DataTypeextractFromType(DataTypeFactory typeFactory, org.apache.flink.table.types.extraction.DataTypeTemplate template, Type type) Extracts a data type from a type without considering surrounding classes but templates.
-
Method Details
-
extractFromType
Extracts a data type from a type without considering surrounding classes or templates. -
extractFromType
public static DataType extractFromType(DataTypeFactory typeFactory, org.apache.flink.table.types.extraction.DataTypeTemplate template, Type type) Extracts a data type from a type without considering surrounding classes but templates. -
extractFromGeneric
public static DataType extractFromGeneric(DataTypeFactory typeFactory, Class<?> baseClass, int genericPos, Type contextType) Extracts a data type from a type variable atgenericPosofbaseClassusing the information of the most specific typecontextType. -
extractFromMethodParameter
public static DataType extractFromMethodParameter(DataTypeFactory typeFactory, Class<?> baseClass, Method method, int paramPos) Extracts a data type from a method parameter by considering surrounding classes and parameter annotation. -
extractFromGenericMethodParameter
public static DataType extractFromGenericMethodParameter(DataTypeFactory typeFactory, Class<?> baseClass, Method method, int paramPos, int genericPos) Extracts a data type from a method parameter by considering surrounding classes and parameter annotation. This version assumes that the parameter is a generic type, and uses the generic position type as the extracted data type. For example, if the parameter is a CompletableFuture<Long> and genericPos is 0, it will extract Long. -
extractFromMethodReturnType
public static DataType extractFromMethodReturnType(DataTypeFactory typeFactory, Class<?> baseClass, Method method) Extracts a data type from a method return type by considering surrounding classes and method annotation. -
extractFromMethodReturnType
public static DataType extractFromMethodReturnType(DataTypeFactory typeFactory, Class<?> baseClass, Method method, Type methodReturnType) Extracts a data type from a method return type with specifying the method's type explicitly by considering surrounding classes and method annotation.
-