Class ProxyXmlMapping
java.lang.Object
net.officefloor.plugin.xml.marshall.tree.ProxyXmlMapping
- All Implemented Interfaces:
XmlMapping
Enables wrapping of a
XmlWriter to let it be
referenced.- Author:
- Daniel Sagenschneider
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected XmlMappingXmlMappingbeing wrapped to delegate XML mapping. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionObtains theXmlWriterfor this mapping.voidMaps the object into XML.voidsetDelegate(XmlMapping delegate)
-
Field Details
-
delegate
XmlMappingbeing wrapped to delegate XML mapping.
-
-
Constructor Details
-
ProxyXmlMapping
public ProxyXmlMapping()
-
-
Method Details
-
setDelegate
The creation of
XmlMapping(and itsXmlWriter) will recursively load itsXmlMapping.This is therefore necessary to enable a child to reference this in place of the actual parent
XmlMapping, as the parentXmlMappingwill not be available until all its descendants are created.- Parameters:
delegate- Delegate to do the XML writing.
-
map
Description copied from interface:XmlMappingMaps the object into XML.- Specified by:
mapin interfaceXmlMapping- Parameters:
source- Object to map into XML.output- Output to send the XML.- Throws:
XmlMarshallException- If fails to map object into XML.
-
getWriter
Description copied from interface:XmlMappingObtains theXmlWriterfor this mapping.- Specified by:
getWriterin interfaceXmlMapping- Returns:
XmlWriterfor this mapping.
-