@Experimental(value=SCHEMAS) public class JavaFieldSchema extends GetterBasedSchemaProvider
SchemaProvider
for Java POJO objects.
This provider finds all public fields (recursively) in a Java object, and creates schemas and rows that bind to those fields. The field order in the schema is not guaranteed to match the field order in the class.
Constructor and Description |
---|
JavaFieldSchema() |
Modifier and Type | Method and Description |
---|---|
FieldValueGetterFactory |
fieldValueGetterFactory()
Implementing class should override to return a getter factory.
|
FieldValueSetterFactory |
fieldValueSetterFactory()
Implementing class should override to return a setter factory.
|
<T> Schema |
schemaFor(TypeDescriptor<T> typeDescriptor)
Lookup a schema for the given type.
|
fromRowFunction, toRowFunction
public <T> Schema schemaFor(TypeDescriptor<T> typeDescriptor)
SchemaProvider
public FieldValueGetterFactory fieldValueGetterFactory()
GetterBasedSchemaProvider
public FieldValueSetterFactory fieldValueSetterFactory()
GetterBasedSchemaProvider