public class StaticSchemaInference
extends java.lang.Object
Schema
from static Java types.Constructor and Description |
---|
StaticSchemaInference() |
Modifier and Type | Method and Description |
---|---|
static Schema |
schemaFromClass(java.lang.Class<?> clazz,
FieldValueTypeSupplier fieldValueTypeSupplier)
Infer a schema from a Java class.
|
static java.util.List<FieldValueTypeInformation> |
sortBySchema(java.util.List<FieldValueTypeInformation> types,
Schema schema) |
public static java.util.List<FieldValueTypeInformation> sortBySchema(java.util.List<FieldValueTypeInformation> types, Schema schema)
public static Schema schemaFromClass(java.lang.Class<?> clazz, FieldValueTypeSupplier fieldValueTypeSupplier)
Takes in a function to extract a list of field types from a class. Different callers may have different strategies for extracting this list: e.g. introspecting public member variables, public getter methods, or special annotations on the class.