Class CollectionXmlMapping
java.lang.Object
net.officefloor.plugin.xml.marshall.tree.AbstractXmlMapping
net.officefloor.plugin.xml.marshall.tree.AbstractTypeXmlMapping
net.officefloor.plugin.xml.marshall.tree.CollectionXmlMapping
- All Implemented Interfaces:
XmlMapping,XmlWriter
Implementation of
XmlMapping
to iterate over a Collection object in context.- Author:
- Daniel Sagenschneider
-
Field Summary
Fields inherited from class net.officefloor.plugin.xml.marshall.tree.AbstractTypeXmlMapping
contexts, elementEnd, elementName, elementStart, itemsFields inherited from class net.officefloor.plugin.xml.marshall.tree.AbstractXmlMapping
getMethod -
Constructor Summary
ConstructorsConstructorDescriptionCollectionXmlMapping(String elementName, Method getMethod, XmlMappingMetaData[] items, TranslatorRegistry translatorRegistry, ReferencedXmlMappingRegistry referenceRegistry) Initiate with details to marshall theCollection. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidwriteSpecificXml(Object object, XmlOutput output) Writes the specific XML for the input object.Methods inherited from class net.officefloor.plugin.xml.marshall.tree.AbstractTypeXmlMapping
getMatchingContext, writeXmlMethods inherited from class net.officefloor.plugin.xml.marshall.tree.AbstractXmlMapping
getWriter, map
-
Constructor Details
-
CollectionXmlMapping
public CollectionXmlMapping(String elementName, Method getMethod, XmlMappingMetaData[] items, TranslatorRegistry translatorRegistry, ReferencedXmlMappingRegistry referenceRegistry) throws XmlMarshallException Initiate with details to marshall theCollection.- Parameters:
elementName- Name of XML element for this mapping ornullif no element.getMethod- Method to obtain the collection.items- Configuration for items within theCollection.referenceRegistry- Registry ofXmlMappingthat may be referenced.translatorRegistry- Registry of theTranslatorinstances.- Throws:
XmlMarshallException- If fails to configure.
-
-
Method Details
-
writeSpecificXml
Description copied from class:AbstractTypeXmlMappingWrites the specific XML for the input object.- Specified by:
writeSpecificXmlin classAbstractTypeXmlMapping- Parameters:
object- Object to be written as XML.output- Output to write the XML.- Throws:
XmlMarshallException- If fails to write the XML.
-