com.openharbor.beck.unmarshal
Class DanglingUnmarshaller

java.lang.Object
  extended bycom.openharbor.beck.unmarshal.DefaultUnmarshaller
      extended bycom.openharbor.beck.unmarshal.DanglingUnmarshaller
All Implemented Interfaces:
MapFromXML.Aware, Unmarshaller
Direct Known Subclasses:
ReferenceUnmarshaller

public abstract class DanglingUnmarshaller
extends DefaultUnmarshaller

An unmarshaller that may call addToParent later than afterEndObject.


Field Summary
 
Fields inherited from class com.openharbor.beck.unmarshal.DefaultUnmarshaller
data, documentState, log
 
Constructor Summary
DanglingUnmarshaller()
           
 
Method Summary
protected  void afterEndObject()
          Don't call addToParent (as the inherited method would).
protected  void disengaged()
          The last engagement on this will soon be disengaged.
protected  void setParentAndSource(Unmarshaller parent, XMLThing source)
          Maintain an engagement on the parent Unmarshaller.
 
Methods inherited from class com.openharbor.beck.unmarshal.DefaultUnmarshaller
addChild, addToParent, addValue, disengage, endElement, endObject, engage, getChildClass, getMap, getMapFromXML, getObject, getObjectClass, getParent, getSource, getSourceXPath, getXMLContext, getXName, getXPath, isEngaged, newObject, processAttributes, referToThis, reset, rethrow, setMapFromXML, setObject, setObjectClass, setValue, setXMLContext, startElement, startObject, toString, trim
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DanglingUnmarshaller

public DanglingUnmarshaller()
Method Detail

setParentAndSource

protected void setParentAndSource(Unmarshaller parent,
                                  XMLThing source)
Maintain an engagement on the parent Unmarshaller. This prevents the parent from being disengaged before this is; which is necessary because this delegates some methods to the parent.

When ContractionUnmarshallers are cascaded, they build up a chain of engagements, with each engaging its parent.

Overrides:
setParentAndSource in class DefaultUnmarshaller

afterEndObject

protected void afterEndObject()
Don't call addToParent (as the inherited method would).

Overrides:
afterEndObject in class DefaultUnmarshaller

disengaged

protected void disengaged()
                   throws java.lang.Exception
Description copied from class: DefaultUnmarshaller
The last engagement on this will soon be disengaged. That is, isEngaged() returns true now, but will cease to do so soon. The default implementation calls reset() and getMapFromXML.recycle(this).

Overrides:
disengaged in class DefaultUnmarshaller
Throws:
java.lang.Exception