Class TreeXmlUnmarshaller.HandlerImpl
- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- net.officefloor.plugin.xml.unmarshall.tree.TreeXmlUnmarshaller.HandlerImpl
-
- All Implemented Interfaces:
org.xml.sax.ContentHandler
,org.xml.sax.DTDHandler
,org.xml.sax.EntityResolver
,org.xml.sax.ErrorHandler
- Enclosing class:
- TreeXmlUnmarshaller
public static class TreeXmlUnmarshaller.HandlerImpl extends org.xml.sax.helpers.DefaultHandler
Handler to load XML values onto target object.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
elementValue
Element value.protected XmlState
state
State of the XML unmarshalling.
-
Constructor Summary
Constructors Constructor Description HandlerImpl(XmlState state)
Initiate with state of XML unmarshalling.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
characters(char[] ch, int start, int length)
Handles obtain the value for the element.void
endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName)
Handles loading the value onto the target value.void
setTargetObject(java.lang.Object targetObject)
Sets the target object.void
startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes)
Handles loading the attribute value on the target value.
-
-
-
Field Detail
-
state
protected final XmlState state
State of the XML unmarshalling.
-
elementValue
protected java.lang.String elementValue
Element value.
-
-
Constructor Detail
-
HandlerImpl
public HandlerImpl(XmlState state)
Initiate with state of XML unmarshalling.- Parameters:
state
- State of XML unmarshalling.
-
-
Method Detail
-
setTargetObject
public void setTargetObject(java.lang.Object targetObject)
Sets the target object.- Parameters:
targetObject
- Target object to have values loaded to it.
-
startElement
public void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes) throws org.xml.sax.SAXException
Handles loading the attribute value on the target value.- Specified by:
startElement
in interfaceorg.xml.sax.ContentHandler
- Overrides:
startElement
in classorg.xml.sax.helpers.DefaultHandler
- Throws:
org.xml.sax.SAXException
-
characters
public void characters(char[] ch, int start, int length) throws org.xml.sax.SAXException
Handles obtain the value for the element.- Specified by:
characters
in interfaceorg.xml.sax.ContentHandler
- Overrides:
characters
in classorg.xml.sax.helpers.DefaultHandler
- Throws:
org.xml.sax.SAXException
-
endElement
public void endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName) throws org.xml.sax.SAXException
Handles loading the value onto the target value.- Specified by:
endElement
in interfaceorg.xml.sax.ContentHandler
- Overrides:
endElement
in classorg.xml.sax.helpers.DefaultHandler
- Throws:
org.xml.sax.SAXException
-
-