public abstract class Loader extends Object
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
expectText |
| Modifier | Constructor and Description |
|---|---|
protected |
Loader() |
protected |
Loader(boolean expectText) |
| Modifier and Type | Method and Description |
|---|---|
void |
childElement(UnmarshallingContext.State state,
TagName ea)
Called when this loaderis an active loaderand we see a new child start tag.
|
boolean |
expectText()
True if this loader expects the
text(UnmarshallingContext.State, CharSequence) method
to be called. |
protected void |
fireAfterUnmarshal(JaxBeanInfo beanInfo,
Object child,
UnmarshallingContext.State state)
Fires the afterUnmarshal event if necessary.
|
protected void |
fireBeforeUnmarshal(JaxBeanInfo beanInfo,
Object child,
UnmarshallingContext.State state)
Fires the beforeUnmarshal event if necessary.
|
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.
|
static void |
handleGenericError(Error e) |
protected static void |
handleGenericException(Exception e)
Last resort when something goes terribly wrong within the unmarshaller.
|
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.
|
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) |
static void |
reportError(String msg,
Exception nested,
boolean canRecover) |
protected void |
reportUnexpectedChildElement(TagName ea,
boolean canRecover) |
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,
CharSequence text)
Called when this loaderis an active loaderand we see a chunk of text.
|
public void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException
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.
ea - info about the start tag. never null.SAXExceptionpublic void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException
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.
SAXExceptionprotected final void reportUnexpectedChildElement(TagName ea, boolean canRecover) throws SAXException
SAXExceptionpublic Collection<QName> getExpectedChildElements()
public Collection<QName> getExpectedAttributes()
public void text(UnmarshallingContext.State state, CharSequence text) throws SAXException
SAXExceptionpublic final boolean expectText()
text(UnmarshallingContext.State, CharSequence) method
to be called. False otherwise.public void leaveElement(UnmarshallingContext.State state, TagName ea) throws SAXException
SAXExceptionprotected final void fireBeforeUnmarshal(JaxBeanInfo beanInfo, Object child, UnmarshallingContext.State state) throws SAXException
state - state of the newly create child object.SAXExceptionprotected final void fireAfterUnmarshal(JaxBeanInfo beanInfo, Object child, UnmarshallingContext.State state) throws SAXException
state - state of the parent objectSAXExceptionprotected static void handleGenericException(Exception e) throws SAXException
SAXExceptionpublic static void handleGenericException(Exception e, boolean canRecover) throws SAXException
SAXExceptionpublic static void handleGenericError(Error e) throws SAXException
SAXExceptionprotected static void reportError(String msg, boolean canRecover) throws SAXException
SAXExceptionpublic static void reportError(String msg, Exception nested, boolean canRecover) throws SAXException
SAXExceptionprotected static void handleParseConversionException(UnmarshallingContext.State state, Exception e) throws SAXException
SAXExceptionCopyright © 2018 JBoss by Red Hat. All rights reserved.