public class ReflectiveSchema extends AbstractSchema
Schema that exposes the
public fields and methods in a Java object.| Modifier and Type | Class and Description |
|---|---|
static class |
ReflectiveSchema.Factory
Factory that creates a schema by instantiating an object and looking at
its public fields.
|
Schema.TableType| Constructor and Description |
|---|
ReflectiveSchema(Object target)
Creates a ReflectiveSchema.
|
| Modifier and Type | Method and Description |
|---|---|
protected com.google.common.collect.Multimap<String,Function> |
getFunctionMultimap()
Returns a multi-map of functions in this schema by name.
|
protected Map<String,Table> |
getTableMap()
Returns a map of tables in this schema by name.
|
Object |
getTarget()
Returns the wrapped object.
|
String |
toString() |
contentsHaveChangedSince, getExpression, getFunctionNames, getFunctions, getSubSchema, getSubSchemaMap, getSubSchemaNames, getTable, getTableNames, isMutablepublic ReflectiveSchema(Object target)
target - Object whose fields will be sub-objects of the schemapublic Object getTarget()
May not appear to be used, but is used in generated code via
BuiltInMethod.REFLECTIVE_SCHEMA_GET_TARGET.
protected Map<String,Table> getTableMap()
AbstractSchemaThe implementations of AbstractSchema.getTableNames()
and AbstractSchema.getTable(String) depend on this map.
The default implementation of this method returns the empty map.
Override this method to change their behavior.
getTableMap in class AbstractSchemaprotected com.google.common.collect.Multimap<String,Function> getFunctionMultimap()
AbstractSchemaThe implementations of AbstractSchema.getFunctionNames()
and Schema.getFunctions(String) depend on this map.
The default implementation of this method returns the empty multi-map.
Override this method to change their behavior.
getFunctionMultimap in class AbstractSchemaCopyright © 2012–2015 The Apache Software Foundation. All rights reserved.