Class AttributeXmlMapping
- java.lang.Object
-
- net.officefloor.plugin.xml.marshall.tree.AbstractXmlMapping
-
- net.officefloor.plugin.xml.marshall.tree.AbstractValueXmlMapping
-
- net.officefloor.plugin.xml.marshall.tree.AttributeXmlMapping
-
- All Implemented Interfaces:
XmlMapping,XmlWriter
public class AttributeXmlMapping extends AbstractValueXmlMapping
Writes an XML attribute with value sourced from object.- Author:
- Daniel Sagenschneider
-
-
Field Summary
-
Fields inherited from class net.officefloor.plugin.xml.marshall.tree.AbstractValueXmlMapping
isUseRaw, tagName, translator
-
Fields inherited from class net.officefloor.plugin.xml.marshall.tree.AbstractXmlMapping
getMethod
-
-
Constructor Summary
Constructors Constructor Description AttributeXmlMapping(java.lang.String tagName, java.lang.reflect.Method getMethod, Translator translator, boolean isUseRaw)From super.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidwriteXml(java.lang.String tagName, java.lang.String value, XmlOutput output)Writes the XML.-
Methods inherited from class net.officefloor.plugin.xml.marshall.tree.AbstractValueXmlMapping
writeXml
-
Methods inherited from class net.officefloor.plugin.xml.marshall.tree.AbstractXmlMapping
getWriter, map
-
-
-
-
Constructor Detail
-
AttributeXmlMapping
public AttributeXmlMapping(java.lang.String tagName, java.lang.reflect.Method getMethod, Translator translator, boolean isUseRaw)From super.- Parameters:
tagName- Name of the XML tag.getMethod-Methodto obtain the value.translator-Translator.isUseRaw- Indicates to use raw.
-
-
Method Detail
-
writeXml
protected void writeXml(java.lang.String tagName, java.lang.String value, XmlOutput output) throws XmlMarshallExceptionDescription copied from class:AbstractValueXmlMappingWrites the XML.- Specified by:
writeXmlin classAbstractValueXmlMapping- Parameters:
tagName- Tag name for writing XML snippet.value- Value of XML snippet.output- Output to send the XML snippet.- Throws:
XmlMarshallException- If fails to write XML.
-
-