public class StaticSchemaInference
extends java.lang.Object
Schema from static Java types.| Constructor and Description | 
|---|
StaticSchemaInference()  | 
| Modifier and Type | Method and Description | 
|---|---|
static Schema.FieldType | 
fieldFromType(TypeDescriptor type,
             FieldValueTypeSupplier fieldValueTypeSupplier)
Map a Java field type to a Beam Schema FieldType. 
 | 
static Schema | 
schemaFromClass(TypeDescriptor<?> typeDescriptor,
               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(TypeDescriptor<?> typeDescriptor, 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.
public static Schema.FieldType fieldFromType(TypeDescriptor type, FieldValueTypeSupplier fieldValueTypeSupplier)