Class ProxyXmlMapping
- java.lang.Object
-
- net.officefloor.plugin.xml.marshall.tree.ProxyXmlMapping
-
- All Implemented Interfaces:
XmlMapping
public class ProxyXmlMapping extends java.lang.Object implements XmlMapping
Enables wrapping of aXmlWriterto let it be referenced.- Author:
- Daniel Sagenschneider
-
-
Field Summary
Fields Modifier and Type Field Description protected XmlMappingdelegateXmlMappingbeing wrapped to delegate XML mapping.
-
Constructor Summary
Constructors Constructor Description ProxyXmlMapping()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description XmlWritergetWriter()Obtains theXmlWriterfor this mapping.voidmap(java.lang.Object source, XmlOutput output)Maps the object into XML.voidsetDelegate(XmlMapping delegate)
-
-
-
Field Detail
-
delegate
protected XmlMapping delegate
XmlMappingbeing wrapped to delegate XML mapping.
-
-
Method Detail
-
setDelegate
public void setDelegate(XmlMapping delegate)
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
public void map(java.lang.Object source, XmlOutput output) throws XmlMarshallExceptionDescription 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
public XmlWriter getWriter()
Description copied from interface:XmlMappingObtains theXmlWriterfor this mapping.- Specified by:
getWriterin interfaceXmlMapping- Returns:
XmlWriterfor this mapping.
-
-