|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Converts an object to XML. Different source objects require different Marshaller classes. The best Marshaller for a given source object is ordinarily chosen by a MapToXML.
A Marshaller is re-entrant; that is, a single instance can convert from several sources, sequentially, concurrently or recursively.
Method Summary | |
java.lang.String |
getText(java.lang.Object parent,
Getter getter,
java.lang.Object child,
XMLWriter writer)
Copy data as a String, for use as XML element text or an XML attribute value. |
XMLThing |
getXML(MapToXML mapper,
java.lang.Object parent,
Getter getter,
XMLWriter writer)
Choose the XML element or attribute name for a Java object. |
java.lang.Object |
getXMLSource(MapToXML mapper,
java.lang.Object parent,
Getter getter)
The object from which the XML is mapped, or null to indicate that the XML does not correspond to an object. |
void |
marshal(MapToXML mapper,
java.lang.Object parent,
Getter getter,
XMLThing tag,
XMLWriter writer)
Generate XML from an object and its contained objects (if any). |
Method Detail |
public void marshal(MapToXML mapper, java.lang.Object parent, Getter getter, XMLThing tag, XMLWriter writer) throws java.lang.Exception
parent
- the object that contains this one, or null if the containing object is unknown.getter
- a reference to the object to be mapped and its name (if any) in the parent.tag
- the desired element name and conditions, or null if unspecified.writer
- the stream wherein to marshal the generated XML.
java.lang.Exception
public XMLThing getXML(MapToXML mapper, java.lang.Object parent, Getter getter, XMLWriter writer) throws java.lang.Exception
getter
- to be mapped to XMLparent
- contains source
java.lang.Exception
public java.lang.String getText(java.lang.Object parent, Getter getter, java.lang.Object child, XMLWriter writer) throws java.lang.Exception
java.lang.Exception
public java.lang.Object getXMLSource(MapToXML mapper, java.lang.Object parent, Getter getter)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |