|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.oddjob.arooa.ArooaHandler
org.oddjob.arooa.handlers.TypicalElementHandler
org.oddjob.arooa.handlers.ValueHandler
This handler handles nested values. The values are created either with the class attribute or from the tag name using the Constants.VALUE_FACTORY.
The value create is added to the object being configured with a fake element tag which can be specified in the constructor. Even though the element being processed is <xyz> the addConfigured'ElementTag' method of the object currently being configured will be called with the new value.
Note that a value handler will not attempt to call the add'ElementTag' method on value creation, so the value objects created with this handler are only available to the object being configured at runtime, not parse time.
| Field Summary | |
static java.lang.String |
DEFAULT_ELEMENT_TAG
The default tag name |
| Constructor Summary | |
ValueHandler()
The default consructor. |
|
ValueHandler(java.lang.String elementTag)
Constructor for a hanler which |
|
| Method Summary | |
void |
onStartElement(java.lang.String uri,
java.lang.String tag,
java.lang.String qname,
org.xml.sax.Attributes attrs,
ArooaContext context)
Handles the start of an element. |
void |
setValueFactory(ObjectFactory valueFactory)
Set a value factory. |
| Methods inherited from class org.oddjob.arooa.handlers.TypicalElementHandler |
characters, onStartChild |
| Methods inherited from class org.oddjob.arooa.ArooaHandler |
checkNamespace, onEndChild, onEndElement |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String DEFAULT_ELEMENT_TAG
| Constructor Detail |
public ValueHandler()
public ValueHandler(java.lang.String elementTag)
elementTag - | Method Detail |
public void setValueFactory(ObjectFactory valueFactory)
valueFactory - The ObjectFactory for creating the values.
public void onStartElement(java.lang.String uri,
java.lang.String tag,
java.lang.String qname,
org.xml.sax.Attributes attrs,
ArooaContext context)
throws org.xml.sax.SAXParseException
ArooaHandler
onStartElement in class TypicalElementHandlerorg.xml.sax.SAXParseException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||