Class StaticXmlMapping
- java.lang.Object
-
- net.officefloor.plugin.xml.unmarshall.tree.StaticXmlMapping
-
- All Implemented Interfaces:
XmlMapping
public class StaticXmlMapping extends java.lang.Object implements XmlMapping
XmlMapping
that loads a static value to the target object.- Author:
- Daniel Sagenschneider
-
-
Field Summary
Fields Modifier and Type Field Description protected StaticValueLoader
loader
Loader to load the staic value.
-
Constructor Summary
Constructors Constructor Description StaticXmlMapping(StaticValueLoader loader)
Initiate with static value loader.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
endMapping(XmlState state, java.lang.String elementName)
Ends the load of the value/object to the target object based on the current context and state of unmarshalling.void
startMapping(XmlState state, java.lang.String elementName)
Starts the load of the value/object to the target object based on the current context and state of unmarshalling.
-
-
-
Field Detail
-
loader
protected final StaticValueLoader loader
Loader to load the staic value.
-
-
Constructor Detail
-
StaticXmlMapping
public StaticXmlMapping(StaticValueLoader loader)
Initiate with static value loader.- Parameters:
loader
- Loads the static value onto the target object.
-
-
Method Detail
-
startMapping
public void startMapping(XmlState state, java.lang.String elementName) throws XmlMarshallException
Description copied from interface:XmlMapping
Starts the load of the value/object to the target object based on the current context and state of unmarshalling.- Specified by:
startMapping
in interfaceXmlMapping
- Parameters:
state
- Current state of XML unmarshalling.elementName
- Name of element/attribute being mapped.- Throws:
XmlMarshallException
- If fail to load XML mapping.
-
endMapping
public void endMapping(XmlState state, java.lang.String elementName) throws XmlMarshallException
Description copied from interface:XmlMapping
Ends the load of the value/object to the target object based on the current context and state of unmarshalling.- Specified by:
endMapping
in interfaceXmlMapping
- Parameters:
state
- state of XML unmarshalling.elementName
- Value of the element/attribute.- Throws:
XmlMarshallException
- If fail to load XML mapping.
-
-