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 ofXmlMapping
to iterate over aCollection
object 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 void
writeSpecificXml(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 XmlMarshallException
Initiate with details to marshall theCollection
.- Parameters:
elementName
- Name of XML element for this mapping ornull
if no element.getMethod
- Method to obtain the collection.items
- Configuration for items within theCollection
.referenceRegistry
- Registry ofXmlMapping
that may be referenced.translatorRegistry
- Registry of theTranslator
instances.- Throws:
XmlMarshallException
- If fails to configure.
-
-
Method Detail
-
writeSpecificXml
protected void writeSpecificXml(java.lang.Object object, XmlOutput output) throws XmlMarshallException
Description copied from class:AbstractTypeXmlMapping
Writes the specific XML for the input object.- Specified by:
writeSpecificXml
in classAbstractTypeXmlMapping
- Parameters:
object
- Object to be written as XML.output
- Output to write the XML.- Throws:
XmlMarshallException
- If fails to write the XML.
-
-