| java.lang.Object com.sun.xml.bind.v2.runtime.unmarshaller.Loader
All known Subclasses: com.sun.xml.bind.v2.runtime.unmarshaller.DomLoader, com.sun.xml.bind.v2.runtime.unmarshaller.LeafPropertyLoader, com.sun.xml.bind.v2.runtime.unmarshaller.ProxyLoader, com.sun.xml.bind.v2.runtime.unmarshaller.ValuePropertyLoader, com.sun.xml.bind.v2.runtime.unmarshaller.Discarder, com.sun.xml.bind.v2.runtime.unmarshaller.StructureLoader, com.sun.xml.bind.v2.runtime.unmarshaller.DefaultValueLoaderDecorator, com.sun.xml.bind.v2.runtime.unmarshaller.TextLoader, com.sun.xml.bind.v2.runtime.unmarshaller.XsiTypeLoader,
Loader | abstract public class Loader (Code) | | author: Kohsuke Kawaguchi |
Constructor Summary | |
protected | Loader(boolean expectText) | protected | Loader() |
Method Summary | |
public void | childElement(UnmarshallingContext.State state, TagName ea) Called when this loaderis an active loaderand we see a new child start tag. | final public boolean | expectText() True if this loader expects the
Loader.text(UnmarshallingContext.State,CharSequence) method
to be called. | final protected void | fireAfterUnmarshal(JaxBeanInfo beanInfo, Object child, UnmarshallingContext.State state) Fires the afterUnmarshal event if necessary. | final protected void | fireBeforeUnmarshal(JaxBeanInfo beanInfo, Object child, UnmarshallingContext.State state) Fires the beforeUnmarshal event if necessary. | public Collection<QName> | getExpectedChildElements() Returns a set of tag names expected as possible child elements in this context. | protected static void | handleGenericException(Exception e) Last resort when something goes terribly wrong within the unmarshaller. | public static void | handleGenericException(Exception e, boolean canRecover) | protected static void | handleParseConversionException(UnmarshallingContext.State state, Exception e) This method is called by the generated derived class
when a datatype parse method throws an exception. | public void | leaveElement(UnmarshallingContext.State state, TagName ea) Called when this loaderis an active loaderand we see an end tag. | protected static void | reportError(String msg, boolean canRecover) | public static void | reportError(String msg, Exception nested, boolean canRecover) | final protected void | reportUnexpectedChildElement(TagName ea, boolean canRecover) | public 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.
The callee may change state.loader to designate another
Loader for the processing. | public void | text(UnmarshallingContext.State state, CharSequence text) Called when this loaderis an active loaderand we see a chunk of text. |
expectText | protected boolean expectText(Code) | | |
Loader | protected Loader(boolean expectText)(Code) | | |
Loader | protected Loader()(Code) | | |
childElement | public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException(Code) | | Called when this loaderis an active loaderand we see a new child start tag.
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.
|
getExpectedChildElements | public Collection<QName> getExpectedChildElements()(Code) | | Returns a set of tag names expected as possible child elements in this context.
|
handleGenericException | protected static void handleGenericException(Exception e) throws SAXException(Code) | | Last resort when something goes terribly wrong within the unmarshaller.
|
reportUnexpectedChildElement | final protected void reportUnexpectedChildElement(TagName ea, boolean canRecover) throws SAXException(Code) | | |
startElement | public void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException(Code) | | 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
Loader for the processing. It's the responsibility of the callee to forward the startElement
event in such a case.
Parameters: ea - info about the start tag. never null. |
text | public void text(UnmarshallingContext.State state, CharSequence text) throws SAXException(Code) | | Called when this loaderis an active loaderand we see a chunk of text.
The runtime makes sure that adjacent characters (even those separated
by comments, PIs, etc) are reported as one event.
IOW, you won't see two text event calls in a row.
|
|
|