Top Description Fields Constructors Methods
org.glassfish.jaxb.runtime.v2.runtime.unmarshaller

public Class XsiTypeLoader

extends Loader
Class Inheritance
Imports
com.sun.istack.Nullable, org.glassfish.jaxb.runtime.DatatypeConverterImpl, org.glassfish.jaxb.runtime.v2.runtime.JaxBeanInfo, org.xml.sax.Attributes, .SAXException, javax.xml.XMLConstants, javax.xml.namespace.QName, java.util.Collection, .Collections, .HashSet

Looks at @xsi:type and forwards to the right Loader.
Author
Kohsuke Kawaguchi

Field Summary

Modifier and TypeField and Description
private final JaxBeanInfo<BeanT>
defaultBeanInfo

Use this when no @xsi:type was found.

pack-priv static final QName
Inherited from org.glassfish.jaxb.runtime.v2.runtime.unmarshaller.Loader:
expectText

Constructor Summary

AccessConstructor and Description
public
XsiTypeLoader(JaxBeanInfo<BeanT> defaultBeanInfo)

Method Summary

Modifier and TypeMethod and Description
public Collection<QName>
getExpectedAttributes()

Overrides org.glassfish.jaxb.runtime.v2.runtime.unmarshaller.Loader.getExpectedAttributes.

Returns a set of tag names expected as possible child elements in this context.

pack-priv static JaxBeanInfo<BeanT>
parseXsiType(UnmarshallingContext.State state, TagName ea, JaxBeanInfo<BeanT> defaultBeanInfo)

public void
startElement(UnmarshallingContext.State state, TagName ea)

Overrides org.glassfish.jaxb.runtime.v2.runtime.unmarshaller.Loader.startElement.

Called when the loader is activated, which is when a new start tag is seen and when the parent designated this loader as the child loader.

Inherited from org.glassfish.jaxb.runtime.v2.runtime.unmarshaller.Loader:
childElementexpectTextfireAfterUnmarshalfireBeforeUnmarshalgetExpectedChildElementshandleGenericErrorhandleGenericExceptionhandleGenericExceptionhandleParseConversionExceptionleaveElementreportErrorreportErrorreportUnexpectedChildElementtext

Field Detail

defaultBeanInfoback to summary
private final JaxBeanInfo<BeanT> defaultBeanInfo

Use this when no @xsi:type was found.

XsiTypeQNAMEback to summary
pack-priv static final QName XsiTypeQNAME

Constructor Detail

XsiTypeLoaderback to summary
public XsiTypeLoader(JaxBeanInfo<BeanT> defaultBeanInfo)

Method Detail

getExpectedAttributesback to summary
public Collection<QName> getExpectedAttributes()

Overrides org.glassfish.jaxb.runtime.v2.runtime.unmarshaller.Loader.getExpectedAttributes.

Doc from org.glassfish.jaxb.runtime.v2.runtime.unmarshaller.Loader.getExpectedAttributes.

Returns a set of tag names expected as possible child elements in this context.

Annotations
@Override
parseXsiTypeback to summary
pack-priv static JaxBeanInfo<BeanT> parseXsiType(UnmarshallingContext.State state, TagName ea, JaxBeanInfo<BeanT> defaultBeanInfo) throws SAXException
Annotations
@SuppressWarnings:deprecation
startElementback to summary
public void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException

Overrides org.glassfish.jaxb.runtime.v2.runtime.unmarshaller.Loader.startElement.

Doc from org.glassfish.jaxb.runtime.v2.runtime.unmarshaller.Loader.startElement.

Called when the loader is activated, which is when a new start tag is seen and when the parent designated this loader as the child loader.

The callee may change state.loader to designate another for the processing. It's the responsibility of the callee to forward the startElement event in such a case.

Annotations
@Override