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
public class CollectionXmlMapping extends AbstractTypeXmlMapping
Implementation ofXmlMappingto iterate over aCollectionobject in context.- Author:
- Daniel Sagenschneider
-
-
Field Summary
-
Fields inherited from class net.officefloor.plugin.xml.marshall.tree.AbstractTypeXmlMapping
contexts, elementEnd, elementName, elementStart, items
-
Fields inherited from class net.officefloor.plugin.xml.marshall.tree.AbstractXmlMapping
getMethod
-
-
Constructor Summary
Constructors Constructor Description CollectionXmlMapping(java.lang.String elementName, java.lang.reflect.Method getMethod, XmlMappingMetaData[] items, TranslatorRegistry translatorRegistry, ReferencedXmlMappingRegistry referenceRegistry)Initiate with details to marshall theCollection.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidwriteSpecificXml(java.lang.Object object, XmlOutput output)Writes the specific XML for the input object.-
Methods inherited from class net.officefloor.plugin.xml.marshall.tree.AbstractTypeXmlMapping
getMatchingContext, writeXml
-
Methods inherited from class net.officefloor.plugin.xml.marshall.tree.AbstractXmlMapping
getWriter, map
-
-
-
-
Constructor Detail
-
CollectionXmlMapping
public CollectionXmlMapping(java.lang.String elementName, java.lang.reflect.Method getMethod, XmlMappingMetaData[] items, TranslatorRegistry translatorRegistry, ReferencedXmlMappingRegistry referenceRegistry) throws XmlMarshallExceptionInitiate 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 Detail
-
writeSpecificXml
protected void writeSpecificXml(java.lang.Object object, XmlOutput output) throws XmlMarshallExceptionDescription 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.
-
-