Class DataTypeExtractor
- java.lang.Object
-
- org.apache.flink.table.types.extraction.DataTypeExtractor
-
@Internal public final class DataTypeExtractor extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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 DataTypeextractFromMethodOutput(DataTypeFactory typeFactory, Class<?> baseClass, Method method)Extracts a data type from a method return type by considering surrounding classes and method annotation.static DataTypeextractFromMethodOutput(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 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 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 Detail
-
extractFromType
public static DataType extractFromType(DataTypeFactory typeFactory, Type type)
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.
-
extractFromMethodOutput
public static DataType extractFromMethodOutput(DataTypeFactory typeFactory, Class<?> baseClass, Method method)
Extracts a data type from a method return type by considering surrounding classes and method annotation.
-
extractFromMethodOutput
public static DataType extractFromMethodOutput(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.
-
-