com.sun.xml.bind.v2.runtime.unmarshaller
Class XsiNilLoader

java.lang.Object
  extended by com.sun.xml.bind.v2.runtime.unmarshaller.Loader
      extended by com.sun.xml.bind.v2.runtime.unmarshaller.ProxyLoader
          extended by com.sun.xml.bind.v2.runtime.unmarshaller.XsiNilLoader
Direct Known Subclasses:
XsiNilLoader.Array, XsiNilLoader.Single

public class XsiNilLoader
extends ProxyLoader

Looks for xsi:nil='true' and sets the target to null. Otherwise delegate to another handler.

Author:
Kohsuke Kawaguchi

Nested Class Summary
static class XsiNilLoader.Array
           
static class XsiNilLoader.Single
           
 
Field Summary
 
Fields inherited from class com.sun.xml.bind.v2.runtime.unmarshaller.Loader
expectText
 
Constructor Summary
XsiNilLoader(Loader defaultLoader)
           
 
Method Summary
 Collection<QName> getExpectedAttributes()
          Returns a set of tag names expected as possible child elements in this context.
 Collection<QName> getExpectedChildElements()
          Returns a set of tag names expected as possible child elements in this context.
protected  void onNil(UnmarshallingContext.State state)
          Called when xsi:nil='true' was found.
protected  Loader selectLoader(UnmarshallingContext.State state, TagName ea)
          Picks the loader to delegate to.
 
Methods inherited from class com.sun.xml.bind.v2.runtime.unmarshaller.ProxyLoader
leaveElement, startElement
 
Methods inherited from class com.sun.xml.bind.v2.runtime.unmarshaller.Loader
childElement, expectText, fireAfterUnmarshal, fireBeforeUnmarshal, handleGenericError, handleGenericException, handleGenericException, handleParseConversionException, reportError, reportError, reportUnexpectedChildElement, text
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XsiNilLoader

public XsiNilLoader(Loader defaultLoader)
Method Detail

selectLoader

protected Loader selectLoader(UnmarshallingContext.State state,
                              TagName ea)
                       throws SAXException
Description copied from class: ProxyLoader
Picks the loader to delegate to.

Specified by:
selectLoader in class ProxyLoader
Returns:
never null.
Throws:
SAXException

getExpectedChildElements

public Collection<QName> getExpectedChildElements()
Description copied from class: Loader
Returns a set of tag names expected as possible child elements in this context.

Overrides:
getExpectedChildElements in class Loader

getExpectedAttributes

public Collection<QName> getExpectedAttributes()
Description copied from class: Loader
Returns a set of tag names expected as possible child elements in this context.

Overrides:
getExpectedAttributes in class Loader

onNil

protected void onNil(UnmarshallingContext.State state)
              throws SAXException
Called when xsi:nil='true' was found.

Throws:
SAXException


Copyright © 2005-2011 Oracle Corporation. All Rights Reserved.