Class ObjectXmlMapping
java.lang.Object
net.officefloor.plugin.xml.marshall.tree.AbstractXmlMapping
net.officefloor.plugin.xml.marshall.tree.ObjectXmlMapping
- All Implemented Interfaces:
XmlMapping,XmlWriter
Writes an object into XML.
- Author:
- Daniel Sagenschneider
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final XmlContextXmlContextfor marshalling the object.protected final StringName of XML element for this mapping.Fields inherited from class net.officefloor.plugin.xml.marshall.tree.AbstractXmlMapping
getMethod -
Constructor Summary
ConstructorsConstructorDescriptionObjectXmlMapping(String elementName, Method getMethod, Class<?> upperType, XmlMappingMetaData[] configuration, String contextReference, XmlContext context, TranslatorRegistry translatorRegistry, ReferencedXmlMappingRegistry referenceRegistry) Initiate the object XML mapping. -
Method Summary
Methods inherited from class net.officefloor.plugin.xml.marshall.tree.AbstractXmlMapping
getWriter, map
-
Field Details
-
elementName
Name of XML element for this mapping. -
context
XmlContextfor marshalling the object.
-
-
Constructor Details
-
ObjectXmlMapping
public ObjectXmlMapping(String elementName, Method getMethod, Class<?> upperType, XmlMappingMetaData[] configuration, String contextReference, XmlContext context, TranslatorRegistry translatorRegistry, ReferencedXmlMappingRegistry referenceRegistry) throws XmlMarshallException Initiate the object XML mapping.- Parameters:
elementName- Name of XML element for this mapping ornullif no element.getMethod- Method to obtain the object to map.upperType- Upper bound type for this mapping.configuration- Configuration for the object being mapped.contextReference- Reference by which to register the context as a child context.context- Current context to register the object's child context.referenceRegistry- Registry ofXmlMappingthat may be referenced.translatorRegistry- Registry ofTranslatorinstances.- Throws:
XmlMarshallException- If fails to configure.
-
-
Method Details
-
writeXml
Description copied from interface:XmlWriterWrites the XML for the input object.- Parameters:
object- Object to have XML written for it.output- Output to write the XML.- Throws:
XmlMarshallException- If fails to write the object into XML.
-