@Experimental(value=SCHEMAS) public class JavaBeanSchema extends GetterBasedSchemaProvider
SchemaProvider
for Java Bean objects.
This provider finds (recursively) all public getters and setters 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 method order in the class.
Constructor and Description |
---|
JavaBeanSchema() |
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