|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface MetaDataWritable
A writable implementation of the MetaData interface that is initialised by Extractor objects, and then read by other objects that need information about the available properties.
An instance of this class is created and then passed to a list of one or more Extractor objects, together with a source object to be introspected. The extractor instances deduce information about fields of the source object and then add or update MetaField objects held by the MetaDataImpl.
An instance of MetaDataImpl is then typically cast to the read-only MetaData interface type and passed to objects that make use of the gathered metadata, such as dynaform "gui builders".
| Method Summary | |
|---|---|
MetaField |
getField(String name)
get the field by name |
int |
getFieldCount()
number of fields |
String[] |
getFieldNames()
get all fields names |
MetaFieldWritable |
getOrCreateField(String name)
add a new field to the metadata or return one if one already exists for the given name |
Set<String> |
getRequestedFields()
|
boolean |
isParentOfWantedField(String name)
// we processed this field due to the fact that it was the parent of a requestedField should this field be processed. |
boolean |
isWantedField(String name)
Indicate whether the field with the specified name should be used or ignored. |
Iterator<String> |
iterFieldNames()
iterate through fields |
void |
requestField(String name)
request to add this field if we reach it. |
boolean |
setLockFields(boolean lockFields)
Prevent the adding of any new MetaField objects to this instance (but enhancing existing fields is permitted). |
| Method Detail |
|---|
boolean isWantedField(String name)
setLockFields(boolean)boolean isParentOfWantedField(String name)
#processField(String),
setLockFields(boolean)void requestField(String name)
Name may be of form "foo.bar.baz"
Set<String> getRequestedFields()
MetaFieldWritable getOrCreateField(String name)
int getFieldCount()
MetaData
getFieldCount in interface MetaDataIterator<String> iterFieldNames()
MetaData
iterFieldNames in interface MetaDataMetaField getField(String name)
MetaData
getField in interface MetaDataString[] getFieldNames()
MetaData
getFieldNames in interface MetaDataboolean setLockFields(boolean lockFields)
When set to true, any call to isProcessableField will return false for names that are not already known, and getOrCreateField will throw an exception if the field does not exist.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||