Class XmlState


  • public class XmlState
    extends java.lang.Object
    State of the XML unmarshalling.
    Author:
    Daniel Sagenschneider
    • Field Detail

      • initialContext

        protected final XmlContext initialContext
        Initial XmlContext in which to unmarshall.
      • contextStack

        protected final java.util.Stack<net.officefloor.plugin.xml.unmarshall.tree.XmlContextState> contextStack
        Stack of previous XmlContext.
      • currentTargetObject

        protected java.lang.Object currentTargetObject
        Current target object.
      • endElementName

        protected java.lang.String endElementName
        XML element name to end the current context.
    • Constructor Detail

      • XmlState

        public XmlState​(XmlContext initialContext)
        Initiate with the initial XmlContext.
        Parameters:
        initialContext - Initial XmlContext in which to unmarshall.
    • Method Detail

      • setTargetObject

        public void setTargetObject​(java.lang.Object targetObject)
        Specifies the current target object.
        Parameters:
        targetObject - Target object.
      • reset

        public void reset()
        Resets the state.
      • getCurrentTargetObject

        public java.lang.Object getCurrentTargetObject()
        Obtains the current target object.
        Returns:
        Target object to load values/objects.
      • getEndElementName

        public java.lang.String getEndElementName()
        Obtains the XML element name to end the current context.
        Returns:
        XML element name to end the current context.
      • pushContext

        public void pushContext​(java.lang.String elementName,
                                java.lang.Object targetObject,
                                XmlContext context)
        Makes the input target object and XmlContext the current for XML unmarshalling.
        Parameters:
        elementName - Name of the element/attribute.
        targetObject - Target object.
        context - New XmlContext.