This class can be extended by the generated code to provide type-safe unmarshall methods.
| Modifier and Type | Field and Description |
|---|---|
| private AttachmentUnmarshaller | attachmentUnmarshaller
The attachment unmarshaller used to support MTOM and swaRef. |
| protected final JAXBContextImpl | context
Owning |
| public final UnmarshallingContext | |
| private static final DefaultHandler | |
| private Unmarshaller. | externalListener
Unmarshaller.Listener |
| public static final String | |
| private IDResolver | |
| private XMLReader | |
| private Schema | schema
schema which will be used to validate during calls to unmarshal |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Implements java. Closes this stream and releases any system resources associated with it. |
| public UnmarshalException | createUnmarshalException(SAXException e)
Overrides jakarta. Creates an UnmarshalException from a SAXException. |
| public XmlVisitor | Returns: A component that implements bothUnmarshallerHandler
and ValidationEventHandler. All the parsing errors
should be reported to this error handler for the unmarshalling
process to work correctly.
Also, returned handler expects all the XML names to be interned.Creates and configures a new unmarshalling pipe line. |
| public <A extends XmlAdapter | getAdapter(Class<A> type)
Overrides jakarta. Implements jakarta. Gets the adapter associated with the specified type. |
| public AttachmentUnmarshaller | |
| public <T> JaxBeanInfo | |
| public UnmarshallingContext | |
| public ValidationEventHandler | getEventHandler()
Overrides jakarta. Implements jakarta. Return the current event handler or the default event handler if one hasn't been set. |
| public Unmarshaller. | getListener()
Overrides jakarta. Implements jakarta. Return |
| public Object | getProperty(String name)
Overrides jakarta. Implements jakarta. Default implementation of the getProperty method always throws PropertyException since there are no required properties. |
| public Schema | getSchema()
Overrides jakarta. Implements jakarta. Get the JAXP |
| public UnmarshallerHandler | getUnmarshallerHandler()
Implements jakarta. Get an unmarshaller handler object that can be used as a component in an XML pipeline. |
| private SAXConnector | |
| protected XMLReader | getXMLReader()
Overrides jakarta. Obtains a configured XMLReader. |
| public boolean | handleEvent(ValidationEvent event)
Implements jakarta. Default error handling behavior for |
| private static JAXBException | |
| public boolean | |
| public boolean | |
| public static boolean | |
| public <A extends XmlAdapter | setAdapter(Class<A> type, A adapter)
Overrides jakarta. Implements jakarta. Associates a configured instance of |
| public void | setAttachmentUnmarshaller(AttachmentUnmarshaller au)
Overrides jakarta. Implements jakarta. Associate a context that resolves cid's, content-id URIs, to binary data passed as attachments. |
| public void | setListener(Unmarshaller.
Overrides jakarta. Implements jakarta.
Register unmarshal event callback |
| public void | setProperty(String name, Object value)
Overrides jakarta. Implements jakarta. Default implementation of the setProperty method always throws PropertyException since there are no required properties. |
| public void | setSchema(Schema schema)
Overrides jakarta. Implements jakarta. Specify the JAXP |
| public void | |
| private static InputSource | |
| protected Object | unmarshal(XMLReader reader, InputSource source)
Implements abstract jakarta. Unmarshals an object by using the specified XMLReader and the InputSource. |
| protected <T> JAXBElement | |
| public <T> JAXBElement | unmarshal(Source source, Class<T> expectedType)
Overrides jakarta. Implements jakarta. Unmarshal XML data from the specified XML Source by |
| public <T> JAXBElement | unmarshal(Node node, Class<T> expectedType)
Overrides jakarta. Implements jakarta. Unmarshal XML data by Jakarta XML Binding mapped |
| public Object | unmarshal(Node node)
Implements jakarta. Unmarshal global XML data from the specified DOM tree and return the resulting content tree. |
| public Object | unmarshal(SAXSource source)
Hides jakarta.
Deprecated
|
| public Object | unmarshal(XMLStreamReader reader)
Overrides jakarta. Implements jakarta. Unmarshal XML data from the specified pull parser and return the resulting content tree. |
| public <T> JAXBElement | unmarshal(XMLStreamReader reader, Class<T> expectedType)
Overrides jakarta. Implements jakarta. Unmarshal root element to Jakarta XML Binding mapped |
| public <T> JAXBElement | unmarshal(XMLEventReader reader, Class<T> expectedType)
Overrides jakarta. Implements jakarta. Unmarshal root element to Jakarta XML Binding mapped |
| public Object | unmarshal(XMLEventReader reader)
Overrides jakarta. Implements jakarta. Unmarshal XML data from the specified pull parser and return the resulting content tree. |
| private Object | |
| public Object | |
| public Object | |
| public Object | |
| private Object | |
| public Object |
| attachmentUnmarshaller | back to summary |
|---|---|
| private AttachmentUnmarshaller attachmentUnmarshaller The attachment unmarshaller used to support MTOM and swaRef. | |
| context | back to summary |
|---|---|
| protected final JAXBContextImpl context Owning | |
| coordinator | back to summary |
|---|---|
| public final UnmarshallingContext coordinator | |
| dummyHandler | back to summary |
|---|---|
| private static final DefaultHandler dummyHandler | |
| externalListener | back to summary |
|---|---|
| private Unmarshaller. Unmarshaller.Listener | |
| FACTORY | back to summary |
|---|---|
| public static final String FACTORY | |
| idResolver | back to summary |
|---|---|
| private IDResolver idResolver | |
| reader | back to summary |
|---|---|
| private XMLReader reader Hides jakarta. | |
| schema | back to summary |
|---|---|
| private Schema schema schema which will be used to validate during calls to unmarshal | |
| UnmarshallerImpl | back to summary |
|---|---|
| public UnmarshallerImpl(JAXBContextImpl context, AssociationMap<XmlNode> assoc) | |
| close | back to summary |
|---|---|
| public void close() throws IOException Implements java. Doc from java. Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect. As noted in
| |
| createUnmarshalException | back to summary |
|---|---|
| public UnmarshalException createUnmarshalException(SAXException e) Overrides jakarta. Doc from jakarta. Creates an UnmarshalException from a SAXException. This is an utility method provided for the derived classes. When a provider-implemented ContentHandler wants to throw a JAXBException, it needs to wrap the exception by a SAXException. If the unmarshaller implementation blindly wrap SAXException by JAXBException, such an exception will be a JAXBException wrapped by a SAXException wrapped by another JAXBException. This is silly. This method checks the nested exception of SAXException and reduce those excessive wrapping.
| |
| createUnmarshallerHandler | back to summary |
|---|---|
| public XmlVisitor createUnmarshallerHandler(InfosetScanner<XmlNode> scanner, boolean inplace, JaxBeanInfo<BeanT> expectedType) Creates and configures a new unmarshalling pipe line. Depending on the setting, we put a validator as a filter.
| |
| getAdapter | back to summary |
|---|---|
| public <A extends XmlAdapter Overrides jakarta. Implements jakarta. Doc from jakarta. Gets the adapter associated with the specified type.
This is the reverse operation of the
| |
| getAttachmentUnmarshaller | back to summary |
|---|---|
| public AttachmentUnmarshaller getAttachmentUnmarshaller() Overrides jakarta. Implements jakarta.
| |
| getBeanInfo | back to summary |
|---|---|
| public <T> JaxBeanInfo | |
| getContext | back to summary |
|---|---|
| public UnmarshallingContext getContext() | |
| getEventHandler | back to summary |
|---|---|
| public ValidationEventHandler getEventHandler() Overrides jakarta. Implements jakarta. Doc from jakarta. Return the current event handler or the default event handler if one hasn't been set.
| |
| getListener | back to summary |
|---|---|
| public Unmarshaller. Overrides jakarta. Implements jakarta. Doc from jakarta. Return
| |
| getProperty | back to summary |
|---|---|
| public Object getProperty(String name) throws PropertyException Overrides jakarta. Implements jakarta. Doc from jakarta. Default implementation of the getProperty method always throws PropertyException since there are no required properties. If a provider needs to handle additional properties, it should override this method in a derived class.
| |
| getSchema | back to summary |
|---|---|
| public Schema getSchema() Overrides jakarta. Implements jakarta. Doc from jakarta. Get the JAXP
| |
| getUnmarshallerHandler | back to summary |
|---|---|
| public UnmarshallerHandler getUnmarshallerHandler() Implements jakarta. Doc from jakarta. Get an unmarshaller handler object that can be used as a component in an XML pipeline.
The Jakarta XML Binding Provider can return the same handler object for multiple
invocations of this method. In other words, this method does not
necessarily create a new instance of
| |
| getUnmarshallerHandler | back to summary |
|---|---|
| private SAXConnector getUnmarshallerHandler(boolean intern, JaxBeanInfo<BeanT> expectedType) | |
| getXMLReader | back to summary |
|---|---|
| protected XMLReader getXMLReader() throws JAXBException Overrides jakarta. Obtains a configured XMLReader.
This method is used when the client-specified
| |
| handleEvent | back to summary |
|---|---|
| public boolean handleEvent(ValidationEvent event) Implements jakarta. Default error handling behavior for
| |
| handleStreamException | back to summary |
|---|---|
| private static JAXBException handleStreamException(XMLStreamException e) | |
| hasEventHandler | back to summary |
|---|---|
| public boolean hasEventHandler() Returns true if an event handler is installed. The default handler ignores any errors, and for that this method returns false. | |
| isValidating | back to summary |
|---|---|
| public boolean isValidating()
Deprecated since 2.0
| |
| needsInterning | back to summary |
|---|---|
| public static boolean needsInterning(XMLReader reader) | |
| setAdapter | back to summary |
|---|---|
| public <A extends XmlAdapter Overrides jakarta. Implements jakarta. Doc from jakarta. Associates a configured instance of
Every unmarshaller internally maintains a
This method allows applications to use a configured instance of
| |
| setAttachmentUnmarshaller | back to summary |
|---|---|
| public void setAttachmentUnmarshaller(AttachmentUnmarshaller au) Overrides jakarta. Implements jakarta. Doc from jakarta. Associate a context that resolves cid's, content-id URIs, to
binary data passed as attachments.
Unmarshal time validation, enabled via
| |
| setListener | back to summary |
|---|---|
| public void setListener(Unmarshaller. Overrides jakarta. Implements jakarta. Doc from jakarta.
Register unmarshal event callback
There is only one Listener per Unmarshaller. Setting a Listener replaces the previous set Listener.
One can unregister current Listener by setting listener to
| |
| setProperty | back to summary |
|---|---|
| public void setProperty(String name, Object value) throws PropertyException Overrides jakarta. Implements jakarta. Doc from jakarta. Default implementation of the setProperty method always throws PropertyException since there are no required properties. If a provider needs to handle additional properties, it should override this method in a derived class.
| |
| setSchema | back to summary |
|---|---|
| public void setSchema(Schema schema) Overrides jakarta. Implements jakarta. Doc from jakarta. Specify the JAXP
Initially this property is set to
| |
| setValidating | back to summary |
|---|---|
| public void setValidating(boolean validating)
Deprecated since 2.0
| |
| streamSourceToInputSource | back to summary |
|---|---|
| private static InputSource streamSourceToInputSource(StreamSource ss) Hides jakarta. | |
| unmarshal | back to summary |
|---|---|
| protected Object unmarshal(XMLReader reader, InputSource source) throws JAXBException Implements abstract jakarta. Doc from jakarta. Unmarshals an object by using the specified XMLReader and the InputSource. The callee should call the setErrorHandler method of the XMLReader so that errors are passed to the client-specified ValidationEventHandler.
| |
| unmarshal | back to summary |
|---|---|
| protected <T> JAXBElement | |
| unmarshal | back to summary |
|---|---|
| public <T> JAXBElement Overrides jakarta. Implements jakarta. Doc from jakarta. Unmarshal XML data from the specified XML Source by Implements Unmarshal by Declared Type See SAX 2.0 Parser Pluggability
| |
| unmarshal | back to summary |
|---|---|
| public <T> JAXBElement Overrides jakarta. Implements jakarta. Doc from jakarta. Unmarshal XML data by Jakarta XML Binding mapped Implements Unmarshal by Declared Type
| |
| unmarshal | back to summary |
|---|---|
| public Object unmarshal(Node node) throws JAXBException Implements jakarta. Doc from jakarta. Unmarshal global XML data from the specified DOM tree and return the resulting content tree. Implements Unmarshal Global Root Element.
| |
| unmarshal | back to summary |
|---|---|
| public Object unmarshal(SAXSource source) throws JAXBException Hides jakarta. Deprecated
| |
| unmarshal | back to summary |
|---|---|
| public Object unmarshal(XMLStreamReader reader) throws JAXBException Overrides jakarta. Implements jakarta. Doc from jakarta. Unmarshal XML data from the specified pull parser and return the resulting content tree. Implements Unmarshal Global Root Element.
This method assumes that the parser is on a START_DOCUMENT or
START_ELEMENT event. Unmarshalling will be done from this
start event to the corresponding end event. If this method
returns successfully, the
| |
| unmarshal | back to summary |
|---|---|
| public <T> JAXBElement Overrides jakarta. Implements jakarta. Doc from jakarta. Unmarshal root element to Jakarta XML Binding mapped This method implements unmarshal by declaredType.
This method assumes that the parser is on a START_DOCUMENT or
START_ELEMENT event. Unmarshalling will be done from this
start event to the corresponding end event. If this method
returns successfully, the
| |
| unmarshal | back to summary |
|---|---|
| public <T> JAXBElement Overrides jakarta. Implements jakarta. Doc from jakarta. Unmarshal root element to Jakarta XML Binding mapped This method implements unmarshal by declaredType.
This method assumes that the parser is on a START_DOCUMENT or
START_ELEMENT event. Unmarshalling will be done from this
start event to the corresponding end event. If this method
returns successfully, the
| |
| unmarshal | back to summary |
|---|---|
| public Object unmarshal(XMLEventReader reader) throws JAXBException Overrides jakarta. Implements jakarta. Doc from jakarta. Unmarshal XML data from the specified pull parser and return the resulting content tree. This method is an Unmarshal Global Root method.
This method assumes that the parser is on a START_DOCUMENT or
START_ELEMENT event. Unmarshalling will be done from this
start event to the corresponding end event. If this method
returns successfully, the
| |
| unmarshal0 | back to summary |
|---|---|
| private Object unmarshal0(XMLReader reader, InputSource source, JaxBeanInfo<BeanT> expectedType) throws JAXBException | |
| unmarshal0 | back to summary |
|---|---|
| public Object unmarshal0(Source source, JaxBeanInfo<BeanT> expectedType) throws JAXBException | |
| unmarshal0 | back to summary |
|---|---|
| public Object unmarshal0(Node node, JaxBeanInfo<BeanT> expectedType) throws JAXBException | |
| unmarshal0 | back to summary |
|---|---|
| public Object unmarshal0(XMLStreamReader reader, JaxBeanInfo<BeanT> expectedType) throws JAXBException | |
| unmarshal0 | back to summary |
|---|---|
| private Object unmarshal0(XMLEventReader reader, JaxBeanInfo<BeanT> expectedType) throws JAXBException | |
| unmarshal0 | back to summary |
|---|---|
| public Object unmarshal0(InputStream input, JaxBeanInfo<BeanT> expectedType) throws JAXBException | |