|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.xml.bind.v2.runtime.unmarshaller.Loader
com.sun.xml.bind.v2.runtime.unmarshaller.StructureLoader
public final class StructureLoader
Loads children of an element.
This loader works with a single JaxBeanInfo and handles
attributes, child elements, or child text.
| Constructor Summary | |
|---|---|
StructureLoader(ClassBeanInfoImpl beanInfo)
|
|
| Method Summary | |
|---|---|
void |
childElement(UnmarshallingContext.State state,
TagName arg)
Called when this loaderis an active loaderand we see a new child start tag. |
JaxBeanInfo |
getBeanInfo()
|
java.util.Collection<javax.xml.namespace.QName> |
getExpectedAttributes()
Returns a set of tag names expected as possible child elements in this context. |
java.util.Collection<javax.xml.namespace.QName> |
getExpectedChildElements()
Returns a set of tag names expected as possible child elements in this context. |
void |
init(JAXBContextImpl context,
ClassBeanInfoImpl beanInfo,
Accessor<?,java.util.Map<javax.xml.namespace.QName,java.lang.String>> attWildcard)
Completes the initialization. |
void |
leaveElement(UnmarshallingContext.State state,
TagName ea)
Called when this loaderis an active loaderand we see an end tag. |
void |
startElement(UnmarshallingContext.State state,
TagName ea)
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. |
void |
text(UnmarshallingContext.State state,
java.lang.CharSequence text)
Called when this loaderis an active loaderand we see a chunk of text. |
| Methods inherited from class com.sun.xml.bind.v2.runtime.unmarshaller.Loader |
|---|
expectText, handleGenericError, handleGenericException, reportError |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StructureLoader(ClassBeanInfoImpl beanInfo)
| Method Detail |
|---|
public void init(JAXBContextImpl context,
ClassBeanInfoImpl beanInfo,
Accessor<?,java.util.Map<javax.xml.namespace.QName,java.lang.String>> attWildcard)
To fix the cyclic reference issue, the main part of the initialization needs to be done
after a StructureLoader is set to ClassBeanInfoImpl.loader.
public void startElement(UnmarshallingContext.State state,
TagName ea)
throws org.xml.sax.SAXException
Loader
The callee may change state.loader to designate another Loader
for the processing. It's the responsibility of the callee to forward the startElement
event in such a case.
startElement in class Loaderea - info about the start tag. never null.
org.xml.sax.SAXException
public void childElement(UnmarshallingContext.State state,
TagName arg)
throws org.xml.sax.SAXException
Loader
The callee is expected to designate another loaderas a loaderthat processes
this element, then it should also register a Receiver.
The designated loaderwill become an active loader.
The default implementation reports an error saying an element is unexpected.
childElement in class Loaderorg.xml.sax.SAXExceptionpublic java.util.Collection<javax.xml.namespace.QName> getExpectedChildElements()
Loader
getExpectedChildElements in class Loaderpublic java.util.Collection<javax.xml.namespace.QName> getExpectedAttributes()
Loader
getExpectedAttributes in class Loader
public void text(UnmarshallingContext.State state,
java.lang.CharSequence text)
throws org.xml.sax.SAXException
Loader
text in class Loaderorg.xml.sax.SAXException
public void leaveElement(UnmarshallingContext.State state,
TagName ea)
throws org.xml.sax.SAXException
Loader
leaveElement in class Loaderorg.xml.sax.SAXExceptionpublic JaxBeanInfo getBeanInfo()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||