public class StaticSchemaInference
extends java.lang.Object
Schema
from static Java types.Modifier and Type | Class and Description |
---|---|
static class |
StaticSchemaInference.TypeInformation
Relevant information about a Java type.
|
Constructor and Description |
---|
StaticSchemaInference() |
Modifier and Type | Method and Description |
---|---|
static Schema |
schemaFromClass(java.lang.Class<?> clazz,
java.util.function.Function<java.lang.Class,java.util.List<StaticSchemaInference.TypeInformation>> getTypesForClass)
Infer a schema from a Java class.
|
public static Schema schemaFromClass(java.lang.Class<?> clazz, java.util.function.Function<java.lang.Class,java.util.List<StaticSchemaInference.TypeInformation>> getTypesForClass)
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.