| <!DOCTYPE HTML> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (11.0.2) on Wed Apr 22 10:19:16 CDT 2020 --> |
| <title>Unmarshaller (EclipseLink 3.0.0, API Reference)</title> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <meta name="dc.created" content="2020-04-22"> |
| <link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../jquery/jquery-ui.css" title="Style"> |
| <script type="text/javascript" src="../../../script.js"></script> |
| <script type="text/javascript" src="../../../jquery/jszip/dist/jszip.min.js"></script> |
| <script type="text/javascript" src="../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script> |
| <!--[if IE]> |
| <script type="text/javascript" src="../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script> |
| <![endif]--> |
| <script type="text/javascript" src="../../../jquery/jquery-3.3.1.js"></script> |
| <script type="text/javascript" src="../../../jquery/jquery-migrate-3.0.1.js"></script> |
| <script type="text/javascript" src="../../../jquery/jquery-ui.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="Unmarshaller (EclipseLink 3.0.0, API Reference)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var data = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":38,"i8":6,"i9":6,"i10":6,"i11":6,"i12":6,"i13":6,"i14":6,"i15":38,"i16":6,"i17":6,"i18":6,"i19":6,"i20":6,"i21":6,"i22":6,"i23":6,"i24":6,"i25":6,"i26":6,"i27":6,"i28":6}; |
| var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],32:["t6","Deprecated Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| var pathtoroot = "../../../"; |
| var useModuleDirectories = true; |
| loadScripts(document, 'script');</script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <header role="banner"> |
| <nav role="navigation"> |
| <div class="fixedNav"> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a id="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a id="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../index-all.html">Index</a></li> |
| <li><a href="../../../help-doc.html">Help</a></li> |
| </ul> |
| <div class="aboutLanguage">EclipseLink 3.0.0, API Reference</div> |
| </div> |
| <div class="subNav"> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../allclasses.html">All Classes</a></li> |
| </ul> |
| <ul class="navListSearch"> |
| <li><label for="search">SEARCH:</label> |
| <input type="text" id="search" value="search" disabled="disabled"> |
| <input type="reset" id="reset" value="reset" disabled="disabled"> |
| </li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li><a href="#nested.class.summary">Nested</a> | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a id="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| </div> |
| <div class="navPadding"> </div> |
| <script type="text/javascript"><!-- |
| $('.navPadding').css('padding-top', $('.fixedNav').css("height")); |
| //--> |
| </script> |
| </nav> |
| </header> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <main role="main"> |
| <div class="header"> |
| <div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">jakarta.xml.bind</a></div> |
| <h2 title="Interface Unmarshaller" class="title">Interface Unmarshaller</h2> |
| </div> |
| <div class="contentContainer"> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Known Implementing Classes:</dt> |
| <dd><code><a href="helpers/AbstractUnmarshallerImpl.html" title="class in jakarta.xml.bind.helpers">AbstractUnmarshallerImpl</a></code>, <code><a href="../../../org/eclipse/persistence/jaxb/JAXBUnmarshaller.html" title="class in org.eclipse.persistence.jaxb">JAXBUnmarshaller</a></code></dd> |
| </dl> |
| <hr> |
| <pre>public interface <span class="typeNameLabel">Unmarshaller</span></pre> |
| <div class="block">The <code>Unmarshaller</code> class governs the process of deserializing XML |
| data into newly created Java content trees, optionally validating the XML |
| data as it is unmarshalled. It provides an overloading of unmarshal methods |
| for many different input kinds. |
| |
| <p> |
| Unmarshalling from a File: |
| <blockquote> |
| <pre> |
| JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" ); |
| Unmarshaller u = jc.createUnmarshaller(); |
| Object o = u.unmarshal( new File( "nosferatu.xml" ) ); |
| </pre> |
| </blockquote> |
| |
| |
| <p> |
| Unmarshalling from an InputStream: |
| <blockquote> |
| <pre> |
| InputStream is = new FileInputStream( "nosferatu.xml" ); |
| JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" ); |
| Unmarshaller u = jc.createUnmarshaller(); |
| Object o = u.unmarshal( is ); |
| </pre> |
| </blockquote> |
| |
| <p> |
| Unmarshalling from a URL: |
| <blockquote> |
| <pre> |
| JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" ); |
| Unmarshaller u = jc.createUnmarshaller(); |
| URL url = new URL( "http://beaker.east/nosferatu.xml" ); |
| Object o = u.unmarshal( url ); |
| </pre> |
| </blockquote> |
| |
| <p> |
| Unmarshalling from a StringBuffer using a |
| <code>javax.xml.transform.stream.StreamSource</code>: |
| <blockquote> |
| <pre><code> |
| JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" ); |
| Unmarshaller u = jc.createUnmarshaller(); |
| StringBuffer xmlStr = new StringBuffer( "<?xml version="1.0"?>..." ); |
| Object o = u.unmarshal( new StreamSource( new StringReader( xmlStr.toString() ) ) ); |
| </code></pre> |
| </blockquote> |
| |
| <p> |
| Unmarshalling from a <code>org.w3c.dom.Node</code>: |
| <blockquote> |
| <pre> |
| JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" ); |
| Unmarshaller u = jc.createUnmarshaller(); |
| |
| DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); |
| dbf.setNamespaceAware(true); |
| DocumentBuilder db = dbf.newDocumentBuilder(); |
| Document doc = db.parse(new File( "nosferatu.xml")); |
| |
| Object o = u.unmarshal( doc ); |
| </pre> |
| </blockquote> |
| |
| <p> |
| Unmarshalling from a <code>javax.xml.transform.sax.SAXSource</code> using a |
| client specified validating SAX2.0 parser: |
| <blockquote> |
| <pre> |
| // configure a validating SAX2.0 parser (Xerces2) |
| static final String JAXP_SCHEMA_LANGUAGE = |
| "http://java.sun.com/xml/jaxp/properties/schemaLanguage"; |
| static final String JAXP_SCHEMA_LOCATION = |
| "http://java.sun.com/xml/jaxp/properties/schemaSource"; |
| static final String W3C_XML_SCHEMA = |
| "http://www.w3.org/2001/XMLSchema"; |
| |
| System.setProperty( "javax.xml.parsers.SAXParserFactory", |
| "org.apache.xerces.jaxp.SAXParserFactoryImpl" ); |
| |
| SAXParserFactory spf = SAXParserFactory.newInstance(); |
| spf.setNamespaceAware(true); |
| spf.setValidating(true); |
| SAXParser saxParser = spf.newSAXParser(); |
| |
| try { |
| saxParser.setProperty(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA); |
| saxParser.setProperty(JAXP_SCHEMA_LOCATION, "http://...."); |
| } catch (SAXNotRecognizedException x) { |
| // exception handling omitted |
| } |
| |
| XMLReader xmlReader = saxParser.getXMLReader(); |
| SAXSource source = |
| new SAXSource( xmlReader, new InputSource( "http://..." ) ); |
| |
| // Setup JAXB to unmarshal |
| JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" ); |
| Unmarshaller u = jc.createUnmarshaller(); |
| ValidationEventCollector vec = new ValidationEventCollector(); |
| u.setEventHandler( vec ); |
| |
| // turn off the JAXB provider's default validation mechanism to |
| // avoid duplicate validation |
| u.setValidating( false ) |
| |
| // unmarshal |
| Object o = u.unmarshal( source ); |
| |
| // check for events |
| if( vec.hasEvents() ) { |
| // iterate over events |
| } |
| </pre> |
| </blockquote> |
| |
| <p> |
| Unmarshalling from a StAX XMLStreamReader: |
| <blockquote> |
| <pre> |
| JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" ); |
| Unmarshaller u = jc.createUnmarshaller(); |
| |
| javax.xml.stream.XMLStreamReader xmlStreamReader = |
| javax.xml.stream.XMLInputFactory().newInstance().createXMLStreamReader( ... ); |
| |
| Object o = u.unmarshal( xmlStreamReader ); |
| </pre> |
| </blockquote> |
| |
| <p> |
| Unmarshalling from a StAX XMLEventReader: |
| <blockquote> |
| <pre> |
| JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" ); |
| Unmarshaller u = jc.createUnmarshaller(); |
| |
| javax.xml.stream.XMLEventReader xmlEventReader = |
| javax.xml.stream.XMLInputFactory().newInstance().createXMLEventReader( ... ); |
| |
| Object o = u.unmarshal( xmlEventReader ); |
| </pre> |
| </blockquote> |
| |
| <p> |
| <a id="unmarshalEx"></a> |
| <b>Unmarshalling XML Data</b><br> |
| <blockquote> |
| Unmarshalling can deserialize XML data that represents either an entire XML document |
| or a subtree of an XML document. Typically, it is sufficient to use the |
| unmarshalling methods described by |
| <a href="#unmarshalGlobal">Unmarshal root element that is declared globally</a>. |
| These unmarshal methods utilize <a href="JAXBContext.html" title="class in jakarta.xml.bind"><code>JAXBContext</code></a>'s mapping of global XML element |
| declarations and type definitions to JAXB mapped classes to initiate the |
| unmarshalling of the root element of XML data. When the <a href="JAXBContext.html" title="class in jakarta.xml.bind"><code>JAXBContext</code></a>'s |
| mappings are not sufficient to unmarshal the root element of XML data, |
| the application can assist the unmarshalling process by using the |
| <a href="#unmarshalByDeclaredType">unmarshal by declaredType methods</a>. |
| These methods are useful for unmarshalling XML data where |
| the root element corresponds to a local element declaration in the schema. |
| </blockquote> |
| |
| <blockquote> |
| An unmarshal method never returns null. If the unmarshal process is unable to unmarshal |
| the root of XML content to a JAXB mapped object, a fatal error is reported that |
| terminates processing by throwing JAXBException. |
| </blockquote> |
| |
| <p> |
| <a id="unmarshalGlobal"></a> |
| <b>Unmarshal a root element that is globally declared</b><br> |
| <blockquote> |
| The unmarshal methods that do not have an <code>declaredType</code> parameter use |
| <a href="JAXBContext.html" title="class in jakarta.xml.bind"><code>JAXBContext</code></a> to unmarshal the root element of an XML data. The <a href="JAXBContext.html" title="class in jakarta.xml.bind"><code>JAXBContext</code></a> |
| instance is the one that was used to create this <code>Unmarshaller</code>. The <a href="JAXBContext.html" title="class in jakarta.xml.bind"><code>JAXBContext</code></a> |
| instance maintains a mapping of globally declared XML element and type definition names to |
| JAXB mapped classes. The unmarshal method checks if <a href="JAXBContext.html" title="class in jakarta.xml.bind"><code>JAXBContext</code></a> has a mapping |
| from the root element's XML name and/or <code>@xsi:type</code> to a JAXB mapped class. If it does, it umarshalls the |
| XML data using the appropriate JAXB mapped class. Note that when the root element name is unknown and the root |
| element has an <code>@xsi:type</code>, the XML data is unmarshalled |
| using that JAXB mapped class as the value of a <a href="JAXBElement.html" title="class in jakarta.xml.bind"><code>JAXBElement</code></a>. |
| When the <a href="JAXBContext.html" title="class in jakarta.xml.bind"><code>JAXBContext</code></a> object does not have a mapping for the root element's name |
| nor its <code>@xsi:type</code>, if it exists, |
| then the unmarshal operation will abort immediately by throwing a <a href="UnmarshalException.html" title="class in jakarta.xml.bind"><code>UnmarshalException</code></a>. This exception scenario can be worked around by using the unmarshal by |
| declaredType methods described in the next subsection. |
| </blockquote> |
| |
| <p> |
| <a id="unmarshalByDeclaredType"></a> |
| <b>Unmarshal by Declared Type</b><br> |
| <blockquote> |
| The unmarshal methods with a <code>declaredType</code> parameter enable an |
| application to deserialize a root element of XML data, even when |
| there is no mapping in <a href="JAXBContext.html" title="class in jakarta.xml.bind"><code>JAXBContext</code></a> of the root element's XML name. |
| The unmarshaller unmarshals the root element using the application provided |
| mapping specified as the <code>declaredType</code> parameter. |
| Note that even when the root element's element name is mapped by <a href="JAXBContext.html" title="class in jakarta.xml.bind"><code>JAXBContext</code></a>, |
| the <code>declaredType</code> parameter overrides that mapping for |
| deserializing the root element when using these unmarshal methods. |
| Additionally, when the root element of XML data has an <code>xsi:type</code> attribute and |
| that attribute's value references a type definition that is mapped |
| to a JAXB mapped class by <a href="JAXBContext.html" title="class in jakarta.xml.bind"><code>JAXBContext</code></a>, that the root |
| element's <code>xsi:type</code> attribute takes |
| precedence over the unmarshal methods <code>declaredType</code> parameter. |
| These methods always return a <code>JAXBElement<declaredType></code> |
| instance. The table below shows how the properties of the returned JAXBElement |
| instance are set. |
| |
| <a id="unmarshalDeclaredTypeReturn"></a> |
| <table class="striped"> |
| <caption>Unmarshal By Declared Type returned JAXBElement</caption> |
| <thead> |
| <tr> |
| <th scope="col">JAXBElement Property</th> |
| <th scope="col">Value</th> |
| </tr> |
| <tr> |
| <th scope="col">name</th> |
| <th scope="col"><code>xml element name</code></th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <th scope="row">value</th> |
| <td><code>instanceof declaredType</code></td> |
| </tr> |
| <tr> |
| <th scope="row">declaredType</th> |
| <td>unmarshal method <code>declaredType</code> parameter</td> |
| </tr> |
| <tr> |
| <th scope="row">scope</th> |
| <td><code>null</code> <i>(actual scope is unknown)</i></td> |
| </tr> |
| </tbody> |
| </table> |
| </blockquote> |
| |
| <p> |
| The following is an example of |
| <a href="#unmarshalByDeclaredType">unmarshal by declaredType method</a>. |
| <p> |
| Unmarshal by declaredType from a <code>org.w3c.dom.Node</code>: |
| <blockquote> |
| <pre><code> |
| Schema fragment for example |
| <xs:schema> |
| <xs:complexType name="FooType">...<\xs:complexType> |
| <!-- global element declaration "PurchaseOrder" --> |
| <xs:element name="PurchaseOrder"> |
| <xs:complexType> |
| <xs:sequence> |
| <!-- local element declaration "foo" --> |
| <xs:element name="foo" type="FooType"/> |
| ... |
| </xs:sequence> |
| </xs:complexType> |
| </xs:element> |
| </xs:schema> |
| |
| JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" ); |
| Unmarshaller u = jc.createUnmarshaller(); |
| |
| DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); |
| dbf.setNamespaceAware(true); |
| DocumentBuilder db = dbf.newDocumentBuilder(); |
| Document doc = db.parse(new File( "nosferatu.xml")); |
| Element fooSubtree = ...; // traverse DOM till reach xml element foo, constrained by a |
| // local element declaration in schema. |
| |
| // FooType is the JAXB mapping of the type of local element declaration foo. |
| JAXBElement<FooType> foo = u.unmarshal( fooSubtree, FooType.class); |
| </code></pre> |
| </blockquote> |
| |
| <p> |
| <b>Support for SAX2.0 Compliant Parsers</b><br> |
| <blockquote> |
| A client application has the ability to select the SAX2.0 compliant parser |
| of their choice. If a SAX parser is not selected, then the JAXB Provider's |
| default parser will be used. Even though the JAXB Provider's default parser |
| is not required to be SAX2.0 compliant, all providers are required to allow |
| a client application to specify their own SAX2.0 parser. Some providers may |
| require the client application to specify the SAX2.0 parser at schema compile |
| time. See <a href="#unmarshal(javax.xml.transform.Source)"><code>unmarshal(Source)</code></a> |
| for more detail. |
| </blockquote> |
| |
| <p> |
| <b>Validation and Well-Formedness</b><br> |
| <blockquote> |
| <p> |
| A client application can enable or disable JAXP 1.3 validation |
| mechanism via the <code>setSchema(javax.xml.validation.Schema)</code> API. |
| Sophisticated clients can specify their own validating SAX 2.0 compliant |
| parser and bypass the JAXP 1.3 validation mechanism using the |
| <a href="#unmarshal(javax.xml.transform.Source)"><code>unmarshal(Source)</code></a> API. |
| |
| <p> |
| Since unmarshalling invalid XML content is defined in JAXB 2.0, |
| the Unmarshaller default validation event handler was made more lenient |
| than in JAXB 1.0. When schema-derived code generated |
| by JAXB 1.0 binding compiler is registered with <a href="JAXBContext.html" title="class in jakarta.xml.bind"><code>JAXBContext</code></a>, |
| the default unmarshal validation handler is |
| <a href="helpers/DefaultValidationEventHandler.html" title="class in jakarta.xml.bind.helpers"><code>DefaultValidationEventHandler</code></a> and it |
| terminates the marshal operation after encountering either a fatal error or an error. |
| For a JAXB 2.0 client application, there is no explicitly defined default |
| validation handler and the default event handling only |
| terminates the unmarshal operation after encountering a fatal error. |
| |
| </blockquote> |
| |
| <p> |
| <a id="supportedProps"></a> |
| <b>Supported Properties</b><br> |
| <blockquote> |
| <p> |
| There currently are not any properties required to be supported by all |
| JAXB Providers on Unmarshaller. However, some providers may support |
| their own set of provider specific properties. |
| </blockquote> |
| |
| <p> |
| <a id="unmarshalEventCallback"></a> |
| <b>Unmarshal Event Callbacks</b><br> |
| <blockquote> |
| The <a href="Unmarshaller.html" title="interface in jakarta.xml.bind"><code>Unmarshaller</code></a> provides two styles of callback mechanisms |
| that allow application specific processing during key points in the |
| unmarshalling process. In 'class defined' event callbacks, application |
| specific code placed in JAXB mapped classes is triggered during |
| unmarshalling. 'External listeners' allow for centralized processing |
| of unmarshal events in one callback method rather than by type event callbacks. |
| <p> |
| 'Class defined' event callback methods allow any JAXB mapped class to specify |
| its own specific callback methods by defining methods with the following method signature: |
| <blockquote> |
| <pre> |
| // This method is called immediately after the object is created and before the unmarshalling of this |
| // object begins. The callback provides an opportunity to initialize JavaBean properties prior to unmarshalling. |
| void beforeUnmarshal(Unmarshaller, Object parent); |
| |
| //This method is called after all the properties (except IDREF) are unmarshalled for this object, |
| //but before this object is set to the parent object. |
| void afterUnmarshal(Unmarshaller, Object parent); |
| </pre> |
| </blockquote> |
| The class defined callback methods should be used when the callback method requires |
| access to non-public methods and/or fields of the class. |
| <p> |
| The external listener callback mechanism enables the registration of a <a href="Unmarshaller.Listener.html" title="class in jakarta.xml.bind"><code>Unmarshaller.Listener</code></a> |
| instance with an <a href="#setListener(jakarta.xml.bind.Unmarshaller.Listener)"><code>setListener(Listener)</code></a>. The external listener receives all callback events, |
| allowing for more centralized processing than per class defined callback methods. The external listener |
| receives events when unmarshalling process is marshalling to a JAXB element or to JAXB mapped class. |
| <p> |
| The 'class defined' and external listener event callback methods are independent of each other, |
| both can be called for one event. The invocation ordering when both listener callback methods exist is |
| defined in <a href="Unmarshaller.Listener.html#beforeUnmarshal(java.lang.Object,java.lang.Object)"><code>Unmarshaller.Listener.beforeUnmarshal(Object, Object)</code></a> and <a href="Unmarshaller.Listener.html#afterUnmarshal(java.lang.Object,java.lang.Object)"><code>Unmarshaller.Listener.afterUnmarshal(Object, Object)</code></a>. |
| <p> |
| An event callback method throwing an exception terminates the current unmarshal process. |
| |
| </blockquote></div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="JAXBContext.html" title="class in jakarta.xml.bind"><code>JAXBContext</code></a>, |
| <a href="Marshaller.html" title="interface in jakarta.xml.bind"><code>Marshaller</code></a>, |
| <a href="Validator.html" title="interface in jakarta.xml.bind"><code>Validator</code></a></dd> |
| <dt><span class="simpleTagLabel">Author:</span></dt> |
| <dd><ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li><li>Joe Fialli, Sun Microsystems, Inc.</li></ul></dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.6, JAXB 1.0</dd> |
| </dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ======== NESTED CLASS SUMMARY ======== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="nested.class.summary"> |
| <!-- --> |
| </a> |
| <h3>Nested Class Summary</h3> |
| <table class="memberSummary"> |
| <caption><span>Nested Classes</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Interface</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Unmarshaller.Listener.html" title="class in jakarta.xml.bind">Unmarshaller.Listener</a></span></code></th> |
| <td class="colLast"> |
| <div class="block"> |
| Register an instance of an implementation of this class with <a href="Unmarshaller.html" title="interface in jakarta.xml.bind"><code>Unmarshaller</code></a> to externally listen |
| for unmarshal events.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </section> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Method</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code><A extends <a href="annotation/adapters/XmlAdapter.html" title="class in jakarta.xml.bind.annotation.adapters">XmlAdapter</a>><br>A</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getAdapter(java.lang.Class)">getAdapter</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><A> type)</code></th> |
| <td class="colLast"> |
| <div class="block">Gets the adapter associated with the specified type.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code><a href="attachment/AttachmentUnmarshaller.html" title="class in jakarta.xml.bind.attachment">AttachmentUnmarshaller</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getAttachmentUnmarshaller()">getAttachmentUnmarshaller</a></span>()</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code><a href="ValidationEventHandler.html" title="interface in jakarta.xml.bind">ValidationEventHandler</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getEventHandler()">getEventHandler</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Return the current event handler or the default event handler if one |
| hasn't been set.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code><a href="Unmarshaller.Listener.html" title="class in jakarta.xml.bind">Unmarshaller.Listener</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getListener()">getListener</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Return <a href="Unmarshaller.Listener.html" title="class in jakarta.xml.bind"><code>Unmarshaller.Listener</code></a> registered with this <a href="Unmarshaller.html" title="interface in jakarta.xml.bind"><code>Unmarshaller</code></a>.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getProperty(java.lang.String)">getProperty</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> name)</code></th> |
| <td class="colLast"> |
| <div class="block">Get the particular property in the underlying implementation of |
| <code>Unmarshaller</code>.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/validation/Schema.html?is-external=true" title="class or interface in javax.xml.validation" class="externalLink">Schema</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getSchema()">getSchema</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Get the JAXP 1.3 <a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/validation/Schema.html?is-external=true" title="class or interface in javax.xml.validation" class="externalLink"><code>Schema</code></a> object |
| being used to perform unmarshal-time validation.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code><a href="UnmarshallerHandler.html" title="interface in jakarta.xml.bind">UnmarshallerHandler</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getUnmarshallerHandler()">getUnmarshallerHandler</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Get an unmarshaller handler object that can be used as a component in |
| an XML pipeline.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isValidating()">isValidating</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">since JAXB2.0, please see <a href="#getSchema()"><code>getSchema()</code></a></div> |
| </div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setAdapter(jakarta.xml.bind.annotation.adapters.XmlAdapter)">setAdapter</a></span>​(<a href="annotation/adapters/XmlAdapter.html" title="class in jakarta.xml.bind.annotation.adapters">XmlAdapter</a> adapter)</code></th> |
| <td class="colLast"> |
| <div class="block">Associates a configured instance of <a href="annotation/adapters/XmlAdapter.html" title="class in jakarta.xml.bind.annotation.adapters"><code>XmlAdapter</code></a> with this unmarshaller.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code><A extends <a href="annotation/adapters/XmlAdapter.html" title="class in jakarta.xml.bind.annotation.adapters">XmlAdapter</a>><br>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setAdapter(java.lang.Class,A)">setAdapter</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><A> type, |
| A adapter)</code></th> |
| <td class="colLast"> |
| <div class="block">Associates a configured instance of <a href="annotation/adapters/XmlAdapter.html" title="class in jakarta.xml.bind.annotation.adapters"><code>XmlAdapter</code></a> with this unmarshaller.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setAttachmentUnmarshaller(jakarta.xml.bind.attachment.AttachmentUnmarshaller)">setAttachmentUnmarshaller</a></span>​(<a href="attachment/AttachmentUnmarshaller.html" title="class in jakarta.xml.bind.attachment">AttachmentUnmarshaller</a> au)</code></th> |
| <td class="colLast"> |
| <div class="block">Associate a context that resolves cid's, content-id URIs, to |
| binary data passed as attachments.</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setEventHandler(jakarta.xml.bind.ValidationEventHandler)">setEventHandler</a></span>​(<a href="ValidationEventHandler.html" title="interface in jakarta.xml.bind">ValidationEventHandler</a> handler)</code></th> |
| <td class="colLast"> |
| <div class="block">Allow an application to register a <code>ValidationEventHandler</code>.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setListener(jakarta.xml.bind.Unmarshaller.Listener)">setListener</a></span>​(<a href="Unmarshaller.Listener.html" title="class in jakarta.xml.bind">Unmarshaller.Listener</a> listener)</code></th> |
| <td class="colLast"> |
| <div class="block"> |
| Register unmarshal event callback <a href="Unmarshaller.Listener.html" title="class in jakarta.xml.bind"><code>Unmarshaller.Listener</code></a> with this <a href="Unmarshaller.html" title="interface in jakarta.xml.bind"><code>Unmarshaller</code></a>.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setProperty(java.lang.String,java.lang.Object)">setProperty</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a> value)</code></th> |
| <td class="colLast"> |
| <div class="block">Set the particular property in the underlying implementation of |
| <code>Unmarshaller</code>.</div> |
| </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setSchema(javax.xml.validation.Schema)">setSchema</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/validation/Schema.html?is-external=true" title="class or interface in javax.xml.validation" class="externalLink">Schema</a> schema)</code></th> |
| <td class="colLast"> |
| <div class="block">Specify the JAXP 1.3 <a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/validation/Schema.html?is-external=true" title="class or interface in javax.xml.validation" class="externalLink"><code>Schema</code></a> |
| object that should be used to validate subsequent unmarshal operations |
| against.</div> |
| </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setValidating(boolean)">setValidating</a></span>​(boolean validating)</code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">since JAXB2.0, please see <a href="#setSchema(javax.xml.validation.Schema)"><code>setSchema(javax.xml.validation.Schema)</code></a></div> |
| </div> |
| </td> |
| </tr> |
| <tr id="i16" class="altColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#unmarshal(java.io.File)">unmarshal</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io" class="externalLink">File</a> f)</code></th> |
| <td class="colLast"> |
| <div class="block">Unmarshal XML data from the specified file and return the resulting |
| content tree.</div> |
| </td> |
| </tr> |
| <tr id="i17" class="rowColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#unmarshal(java.io.InputStream)">unmarshal</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io" class="externalLink">InputStream</a> is)</code></th> |
| <td class="colLast"> |
| <div class="block">Unmarshal XML data from the specified InputStream and return the |
| resulting content tree.</div> |
| </td> |
| </tr> |
| <tr id="i18" class="altColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#unmarshal(java.io.Reader)">unmarshal</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io" class="externalLink">Reader</a> reader)</code></th> |
| <td class="colLast"> |
| <div class="block">Unmarshal XML data from the specified Reader and return the |
| resulting content tree.</div> |
| </td> |
| </tr> |
| <tr id="i19" class="rowColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#unmarshal(java.net.URL)">unmarshal</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net" class="externalLink">URL</a> url)</code></th> |
| <td class="colLast"> |
| <div class="block">Unmarshal XML data from the specified URL and return the resulting |
| content tree.</div> |
| </td> |
| </tr> |
| <tr id="i20" class="altColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#unmarshal(javax.xml.stream.XMLEventReader)">unmarshal</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/stream/XMLEventReader.html?is-external=true" title="class or interface in javax.xml.stream" class="externalLink">XMLEventReader</a> reader)</code></th> |
| <td class="colLast"> |
| <div class="block">Unmarshal XML data from the specified pull parser and return the |
| resulting content tree.</div> |
| </td> |
| </tr> |
| <tr id="i21" class="rowColor"> |
| <td class="colFirst"><code><T> <a href="JAXBElement.html" title="class in jakarta.xml.bind">JAXBElement</a><T></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#unmarshal(javax.xml.stream.XMLEventReader,java.lang.Class)">unmarshal</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/stream/XMLEventReader.html?is-external=true" title="class or interface in javax.xml.stream" class="externalLink">XMLEventReader</a> reader, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><T> declaredType)</code></th> |
| <td class="colLast"> |
| <div class="block">Unmarshal root element to JAXB mapped <code>declaredType</code> |
| and return the resulting content tree.</div> |
| </td> |
| </tr> |
| <tr id="i22" class="altColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#unmarshal(javax.xml.stream.XMLStreamReader)">unmarshal</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/stream/XMLStreamReader.html?is-external=true" title="class or interface in javax.xml.stream" class="externalLink">XMLStreamReader</a> reader)</code></th> |
| <td class="colLast"> |
| <div class="block">Unmarshal XML data from the specified pull parser and return the |
| resulting content tree.</div> |
| </td> |
| </tr> |
| <tr id="i23" class="rowColor"> |
| <td class="colFirst"><code><T> <a href="JAXBElement.html" title="class in jakarta.xml.bind">JAXBElement</a><T></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#unmarshal(javax.xml.stream.XMLStreamReader,java.lang.Class)">unmarshal</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/stream/XMLStreamReader.html?is-external=true" title="class or interface in javax.xml.stream" class="externalLink">XMLStreamReader</a> reader, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><T> declaredType)</code></th> |
| <td class="colLast"> |
| <div class="block">Unmarshal root element to JAXB mapped <code>declaredType</code> |
| and return the resulting content tree.</div> |
| </td> |
| </tr> |
| <tr id="i24" class="altColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#unmarshal(javax.xml.transform.Source)">unmarshal</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/transform/Source.html?is-external=true" title="class or interface in javax.xml.transform" class="externalLink">Source</a> source)</code></th> |
| <td class="colLast"> |
| <div class="block">Unmarshal XML data from the specified XML Source and return the |
| resulting content tree.</div> |
| </td> |
| </tr> |
| <tr id="i25" class="rowColor"> |
| <td class="colFirst"><code><T> <a href="JAXBElement.html" title="class in jakarta.xml.bind">JAXBElement</a><T></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#unmarshal(javax.xml.transform.Source,java.lang.Class)">unmarshal</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/transform/Source.html?is-external=true" title="class or interface in javax.xml.transform" class="externalLink">Source</a> source, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><T> declaredType)</code></th> |
| <td class="colLast"> |
| <div class="block">Unmarshal XML data from the specified XML Source by <code>declaredType</code> and return the |
| resulting content tree.</div> |
| </td> |
| </tr> |
| <tr id="i26" class="altColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#unmarshal(org.w3c.dom.Node)">unmarshal</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/org/w3c/dom/Node.html?is-external=true" title="class or interface in org.w3c.dom" class="externalLink">Node</a> node)</code></th> |
| <td class="colLast"> |
| <div class="block">Unmarshal global XML data from the specified DOM tree and return the resulting |
| content tree.</div> |
| </td> |
| </tr> |
| <tr id="i27" class="rowColor"> |
| <td class="colFirst"><code><T> <a href="JAXBElement.html" title="class in jakarta.xml.bind">JAXBElement</a><T></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#unmarshal(org.w3c.dom.Node,java.lang.Class)">unmarshal</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/org/w3c/dom/Node.html?is-external=true" title="class or interface in org.w3c.dom" class="externalLink">Node</a> node, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><T> declaredType)</code></th> |
| <td class="colLast"> |
| <div class="block">Unmarshal XML data by JAXB mapped <code>declaredType</code> |
| and return the resulting content tree.</div> |
| </td> |
| </tr> |
| <tr id="i28" class="altColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#unmarshal(org.xml.sax.InputSource)">unmarshal</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/org/xml/sax/InputSource.html?is-external=true" title="class or interface in org.xml.sax" class="externalLink">InputSource</a> source)</code></th> |
| <td class="colLast"> |
| <div class="block">Unmarshal XML data from the specified SAX InputSource and return the |
| resulting content tree.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ METHOD DETAIL ========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a id="unmarshal(java.io.File)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>unmarshal</h4> |
| <pre class="methodSignature"><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a> unmarshal​(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io" class="externalLink">File</a> f) |
| throws <a href="JAXBException.html" title="class in jakarta.xml.bind">JAXBException</a></pre> |
| <div class="block">Unmarshal XML data from the specified file and return the resulting |
| content tree. |
| |
| <p> |
| Implements <a href="#unmarshalGlobal">Unmarshal Global Root Element</a>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>f</code> - the file to unmarshal XML data from</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the newly created root object of the java content tree</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="JAXBException.html" title="class in jakarta.xml.bind">JAXBException</a></code> - If any unexpected errors occur while unmarshalling</dd> |
| <dd><code><a href="UnmarshalException.html" title="class in jakarta.xml.bind">UnmarshalException</a></code> - If the <a href="ValidationEventHandler.html" title="interface in jakarta.xml.bind"><code>ValidationEventHandler</code></a> |
| returns false from its <code>handleEvent</code> method or the |
| <code>Unmarshaller</code> is unable to perform the XML to Java |
| binding. See <a href="#unmarshalEx">Unmarshalling XML Data</a></dd> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></code> - If the file parameter is null</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="unmarshal(java.io.InputStream)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>unmarshal</h4> |
| <pre class="methodSignature"><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a> unmarshal​(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io" class="externalLink">InputStream</a> is) |
| throws <a href="JAXBException.html" title="class in jakarta.xml.bind">JAXBException</a></pre> |
| <div class="block">Unmarshal XML data from the specified InputStream and return the |
| resulting content tree. Validation event location information may |
| be incomplete when using this form of the unmarshal API. |
| |
| <p> |
| Implements <a href="#unmarshalGlobal">Unmarshal Global Root Element</a>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>is</code> - the InputStream to unmarshal XML data from</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the newly created root object of the java content tree</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="JAXBException.html" title="class in jakarta.xml.bind">JAXBException</a></code> - If any unexpected errors occur while unmarshalling</dd> |
| <dd><code><a href="UnmarshalException.html" title="class in jakarta.xml.bind">UnmarshalException</a></code> - If the <a href="ValidationEventHandler.html" title="interface in jakarta.xml.bind"><code>ValidationEventHandler</code></a> |
| returns false from its <code>handleEvent</code> method or the |
| <code>Unmarshaller</code> is unable to perform the XML to Java |
| binding. See <a href="#unmarshalEx">Unmarshalling XML Data</a></dd> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></code> - If the InputStream parameter is null</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="unmarshal(java.io.Reader)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>unmarshal</h4> |
| <pre class="methodSignature"><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a> unmarshal​(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io" class="externalLink">Reader</a> reader) |
| throws <a href="JAXBException.html" title="class in jakarta.xml.bind">JAXBException</a></pre> |
| <div class="block">Unmarshal XML data from the specified Reader and return the |
| resulting content tree. Validation event location information may |
| be incomplete when using this form of the unmarshal API, |
| because a Reader does not provide the system ID. |
| |
| <p> |
| Implements <a href="#unmarshalGlobal">Unmarshal Global Root Element</a>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>reader</code> - the Reader to unmarshal XML data from</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the newly created root object of the java content tree</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="JAXBException.html" title="class in jakarta.xml.bind">JAXBException</a></code> - If any unexpected errors occur while unmarshalling</dd> |
| <dd><code><a href="UnmarshalException.html" title="class in jakarta.xml.bind">UnmarshalException</a></code> - If the <a href="ValidationEventHandler.html" title="interface in jakarta.xml.bind"><code>ValidationEventHandler</code></a> |
| returns false from its <code>handleEvent</code> method or the |
| <code>Unmarshaller</code> is unable to perform the XML to Java |
| binding. See <a href="#unmarshalEx">Unmarshalling XML Data</a></dd> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></code> - If the InputStream parameter is null</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.6, JAXB 2.0</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="unmarshal(java.net.URL)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>unmarshal</h4> |
| <pre class="methodSignature"><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a> unmarshal​(<a href="https://docs.oracle.com/javase/8/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net" class="externalLink">URL</a> url) |
| throws <a href="JAXBException.html" title="class in jakarta.xml.bind">JAXBException</a></pre> |
| <div class="block">Unmarshal XML data from the specified URL and return the resulting |
| content tree. |
| |
| <p> |
| Implements <a href="#unmarshalGlobal">Unmarshal Global Root Element</a>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>url</code> - the url to unmarshal XML data from</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the newly created root object of the java content tree</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="JAXBException.html" title="class in jakarta.xml.bind">JAXBException</a></code> - If any unexpected errors occur while unmarshalling</dd> |
| <dd><code><a href="UnmarshalException.html" title="class in jakarta.xml.bind">UnmarshalException</a></code> - If the <a href="ValidationEventHandler.html" title="interface in jakarta.xml.bind"><code>ValidationEventHandler</code></a> |
| returns false from its <code>handleEvent</code> method or the |
| <code>Unmarshaller</code> is unable to perform the XML to Java |
| binding. See <a href="#unmarshalEx">Unmarshalling XML Data</a></dd> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></code> - If the URL parameter is null</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="unmarshal(org.xml.sax.InputSource)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>unmarshal</h4> |
| <pre class="methodSignature"><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a> unmarshal​(<a href="https://docs.oracle.com/javase/8/docs/api/org/xml/sax/InputSource.html?is-external=true" title="class or interface in org.xml.sax" class="externalLink">InputSource</a> source) |
| throws <a href="JAXBException.html" title="class in jakarta.xml.bind">JAXBException</a></pre> |
| <div class="block">Unmarshal XML data from the specified SAX InputSource and return the |
| resulting content tree. |
| |
| <p> |
| Implements <a href="#unmarshalGlobal">Unmarshal Global Root Element</a>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>source</code> - the input source to unmarshal XML data from</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the newly created root object of the java content tree</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="JAXBException.html" title="class in jakarta.xml.bind">JAXBException</a></code> - If any unexpected errors occur while unmarshalling</dd> |
| <dd><code><a href="UnmarshalException.html" title="class in jakarta.xml.bind">UnmarshalException</a></code> - If the <a href="ValidationEventHandler.html" title="interface in jakarta.xml.bind"><code>ValidationEventHandler</code></a> |
| returns false from its <code>handleEvent</code> method or the |
| <code>Unmarshaller</code> is unable to perform the XML to Java |
| binding. See <a href="#unmarshalEx">Unmarshalling XML Data</a></dd> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></code> - If the InputSource parameter is null</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="unmarshal(org.w3c.dom.Node)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>unmarshal</h4> |
| <pre class="methodSignature"><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a> unmarshal​(<a href="https://docs.oracle.com/javase/8/docs/api/org/w3c/dom/Node.html?is-external=true" title="class or interface in org.w3c.dom" class="externalLink">Node</a> node) |
| throws <a href="JAXBException.html" title="class in jakarta.xml.bind">JAXBException</a></pre> |
| <div class="block">Unmarshal global XML data from the specified DOM tree and return the resulting |
| content tree. |
| |
| <p> |
| Implements <a href="#unmarshalGlobal">Unmarshal Global Root Element</a>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>node</code> - the document/element to unmarshal XML data from. |
| The caller must support at least Document and Element.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the newly created root object of the java content tree</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="JAXBException.html" title="class in jakarta.xml.bind">JAXBException</a></code> - If any unexpected errors occur while unmarshalling</dd> |
| <dd><code><a href="UnmarshalException.html" title="class in jakarta.xml.bind">UnmarshalException</a></code> - If the <a href="ValidationEventHandler.html" title="interface in jakarta.xml.bind"><code>ValidationEventHandler</code></a> |
| returns false from its <code>handleEvent</code> method or the |
| <code>Unmarshaller</code> is unable to perform the XML to Java |
| binding. See <a href="#unmarshalEx">Unmarshalling XML Data</a></dd> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></code> - If the Node parameter is null</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="#unmarshal(org.w3c.dom.Node,java.lang.Class)"><code>unmarshal(org.w3c.dom.Node, Class)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="unmarshal(org.w3c.dom.Node,java.lang.Class)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>unmarshal</h4> |
| <pre class="methodSignature"><T> <a href="JAXBElement.html" title="class in jakarta.xml.bind">JAXBElement</a><T> unmarshal​(<a href="https://docs.oracle.com/javase/8/docs/api/org/w3c/dom/Node.html?is-external=true" title="class or interface in org.w3c.dom" class="externalLink">Node</a> node, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><T> declaredType) |
| throws <a href="JAXBException.html" title="class in jakarta.xml.bind">JAXBException</a></pre> |
| <div class="block">Unmarshal XML data by JAXB mapped <code>declaredType</code> |
| and return the resulting content tree. |
| |
| <p> |
| Implements <a href="#unmarshalByDeclaredType">Unmarshal by Declared Type</a></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>node</code> - the document/element to unmarshal XML data from. |
| The caller must support at least Document and Element.</dd> |
| <dd><code>declaredType</code> - appropriate JAXB mapped class to hold <code>node</code>'s XML data.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><a href="#unmarshalDeclaredTypeReturn">JAXB Element</a> representation of <code>node</code></dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="JAXBException.html" title="class in jakarta.xml.bind">JAXBException</a></code> - If any unexpected errors occur while unmarshalling</dd> |
| <dd><code><a href="UnmarshalException.html" title="class in jakarta.xml.bind">UnmarshalException</a></code> - If the <a href="ValidationEventHandler.html" title="interface in jakarta.xml.bind"><code>ValidationEventHandler</code></a> |
| returns false from its <code>handleEvent</code> method or the |
| <code>Unmarshaller</code> is unable to perform the XML to Java |
| binding. See <a href="#unmarshalEx">Unmarshalling XML Data</a></dd> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></code> - If any parameter is null</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.6, JAXB 2.0</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="unmarshal(javax.xml.transform.Source)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>unmarshal</h4> |
| <pre class="methodSignature"><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a> unmarshal​(<a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/transform/Source.html?is-external=true" title="class or interface in javax.xml.transform" class="externalLink">Source</a> source) |
| throws <a href="JAXBException.html" title="class in jakarta.xml.bind">JAXBException</a></pre> |
| <div class="block">Unmarshal XML data from the specified XML Source and return the |
| resulting content tree. |
| |
| <p> |
| Implements <a href="#unmarshalGlobal">Unmarshal Global Root Element</a>. |
| |
| <p> |
| <a id="saxParserPlugable"></a> |
| <b>SAX 2.0 Parser Pluggability</b> |
| <p> |
| A client application can choose not to use the default parser mechanism |
| supplied with their JAXB provider. Any SAX 2.0 compliant parser can be |
| substituted for the JAXB provider's default mechanism. To do so, the |
| client application must properly configure a <code>SAXSource</code> containing |
| an <code>XMLReader</code> implemented by the SAX 2.0 parser provider. If the |
| <code>XMLReader</code> has an <code>org.xml.sax.ErrorHandler</code> registered |
| on it, it will be replaced by the JAXB Provider so that validation errors |
| can be reported via the <code>ValidationEventHandler</code> mechanism of |
| JAXB. If the <code>SAXSource</code> does not contain an <code>XMLReader</code>, |
| then the JAXB provider's default parser mechanism will be used. |
| <p> |
| This parser replacement mechanism can also be used to replace the JAXB |
| provider's unmarshal-time validation engine. The client application |
| must properly configure their SAX 2.0 compliant parser to perform |
| validation (as shown in the example above). Any <code>SAXParserExceptions</code> |
| encountered by the parser during the unmarshal operation will be |
| processed by the JAXB provider and converted into JAXB |
| <code>ValidationEvent</code> objects which will be reported back to the |
| client via the <code>ValidationEventHandler</code> registered with the |
| <code>Unmarshaller</code>. <i>Note:</i> specifying a substitute validating |
| SAX 2.0 parser for unmarshalling does not necessarily replace the |
| validation engine used by the JAXB provider for performing on-demand |
| validation. |
| <p> |
| The only way for a client application to specify an alternate parser |
| mechanism to be used during unmarshal is via the |
| <code>unmarshal(SAXSource)</code> API. All other forms of the unmarshal |
| method (File, URL, Node, etc) will use the JAXB provider's default |
| parser and validator mechanisms.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>source</code> - the XML Source to unmarshal XML data from (providers are |
| only required to support SAXSource, DOMSource, and StreamSource)</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the newly created root object of the java content tree</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="JAXBException.html" title="class in jakarta.xml.bind">JAXBException</a></code> - If any unexpected errors occur while unmarshalling</dd> |
| <dd><code><a href="UnmarshalException.html" title="class in jakarta.xml.bind">UnmarshalException</a></code> - If the <a href="ValidationEventHandler.html" title="interface in jakarta.xml.bind"><code>ValidationEventHandler</code></a> |
| returns false from its <code>handleEvent</code> method or the |
| <code>Unmarshaller</code> is unable to perform the XML to Java |
| binding. See <a href="#unmarshalEx">Unmarshalling XML Data</a></dd> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></code> - If the Source parameter is null</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="#unmarshal(javax.xml.transform.Source,java.lang.Class)"><code>unmarshal(javax.xml.transform.Source, Class)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="unmarshal(javax.xml.transform.Source,java.lang.Class)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>unmarshal</h4> |
| <pre class="methodSignature"><T> <a href="JAXBElement.html" title="class in jakarta.xml.bind">JAXBElement</a><T> unmarshal​(<a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/transform/Source.html?is-external=true" title="class or interface in javax.xml.transform" class="externalLink">Source</a> source, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><T> declaredType) |
| throws <a href="JAXBException.html" title="class in jakarta.xml.bind">JAXBException</a></pre> |
| <div class="block">Unmarshal XML data from the specified XML Source by <code>declaredType</code> and return the |
| resulting content tree. |
| |
| <p> |
| Implements <a href="#unmarshalByDeclaredType">Unmarshal by Declared Type</a> |
| |
| <p> |
| See <a href="#saxParserPlugable">SAX 2.0 Parser Pluggability</a></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>source</code> - the XML Source to unmarshal XML data from (providers are |
| only required to support SAXSource, DOMSource, and StreamSource)</dd> |
| <dd><code>declaredType</code> - appropriate JAXB mapped class to hold <code>source</code>'s xml root element</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Java content rooted by <a href="#unmarshalDeclaredTypeReturn">JAXB Element</a></dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="JAXBException.html" title="class in jakarta.xml.bind">JAXBException</a></code> - If any unexpected errors occur while unmarshalling</dd> |
| <dd><code><a href="UnmarshalException.html" title="class in jakarta.xml.bind">UnmarshalException</a></code> - If the <a href="ValidationEventHandler.html" title="interface in jakarta.xml.bind"><code>ValidationEventHandler</code></a> |
| returns false from its <code>handleEvent</code> method or the |
| <code>Unmarshaller</code> is unable to perform the XML to Java |
| binding. See <a href="#unmarshalEx">Unmarshalling XML Data</a></dd> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></code> - If any parameter is null</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.6, JAXB 2.0</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="unmarshal(javax.xml.stream.XMLStreamReader)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>unmarshal</h4> |
| <pre class="methodSignature"><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a> unmarshal​(<a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/stream/XMLStreamReader.html?is-external=true" title="class or interface in javax.xml.stream" class="externalLink">XMLStreamReader</a> reader) |
| throws <a href="JAXBException.html" title="class in jakarta.xml.bind">JAXBException</a></pre> |
| <div class="block">Unmarshal XML data from the specified pull parser and return the |
| resulting content tree. |
| |
| <p> |
| Implements <a href="#unmarshalGlobal">Unmarshal Global Root Element</a>. |
| |
| <p> |
| 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 <code>reader</code> will be pointing at |
| the token right after the end event.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>reader</code> - The parser to be read.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the newly created root object of the java content tree.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="JAXBException.html" title="class in jakarta.xml.bind">JAXBException</a></code> - If any unexpected errors occur while unmarshalling</dd> |
| <dd><code><a href="UnmarshalException.html" title="class in jakarta.xml.bind">UnmarshalException</a></code> - If the <a href="ValidationEventHandler.html" title="interface in jakarta.xml.bind"><code>ValidationEventHandler</code></a> |
| returns false from its <code>handleEvent</code> method or the |
| <code>Unmarshaller</code> is unable to perform the XML to Java |
| binding. See <a href="#unmarshalEx">Unmarshalling XML Data</a></dd> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></code> - If the <code>reader</code> parameter is null</dd> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalStateException</a></code> - If <code>reader</code> is not pointing to a START_DOCUMENT or |
| START_ELEMENT event.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="#unmarshal(javax.xml.stream.XMLStreamReader,java.lang.Class)"><code>unmarshal(javax.xml.stream.XMLStreamReader, Class)</code></a></dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.6, JAXB 2.0</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="unmarshal(javax.xml.stream.XMLStreamReader,java.lang.Class)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>unmarshal</h4> |
| <pre class="methodSignature"><T> <a href="JAXBElement.html" title="class in jakarta.xml.bind">JAXBElement</a><T> unmarshal​(<a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/stream/XMLStreamReader.html?is-external=true" title="class or interface in javax.xml.stream" class="externalLink">XMLStreamReader</a> reader, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><T> declaredType) |
| throws <a href="JAXBException.html" title="class in jakarta.xml.bind">JAXBException</a></pre> |
| <div class="block">Unmarshal root element to JAXB mapped <code>declaredType</code> |
| and return the resulting content tree. |
| |
| <p> |
| This method implements <a href="#unmarshalByDeclaredType">unmarshal by declaredType</a>. |
| <p> |
| 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 <code>reader</code> will be pointing at |
| the token right after the end event.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>reader</code> - The parser to be read.</dd> |
| <dd><code>declaredType</code> - appropriate JAXB mapped class to hold <code>reader</code>'s START_ELEMENT XML data.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>content tree rooted by <a href="#unmarshalDeclaredTypeReturn">JAXB Element representation</a></dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="JAXBException.html" title="class in jakarta.xml.bind">JAXBException</a></code> - If any unexpected errors occur while unmarshalling</dd> |
| <dd><code><a href="UnmarshalException.html" title="class in jakarta.xml.bind">UnmarshalException</a></code> - If the <a href="ValidationEventHandler.html" title="interface in jakarta.xml.bind"><code>ValidationEventHandler</code></a> |
| returns false from its <code>handleEvent</code> method or the |
| <code>Unmarshaller</code> is unable to perform the XML to Java |
| binding. See <a href="#unmarshalEx">Unmarshalling XML Data</a></dd> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></code> - If any parameter is null</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.6, JAXB 2.0</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="unmarshal(javax.xml.stream.XMLEventReader)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>unmarshal</h4> |
| <pre class="methodSignature"><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a> unmarshal​(<a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/stream/XMLEventReader.html?is-external=true" title="class or interface in javax.xml.stream" class="externalLink">XMLEventReader</a> reader) |
| throws <a href="JAXBException.html" title="class in jakarta.xml.bind">JAXBException</a></pre> |
| <div class="block">Unmarshal XML data from the specified pull parser and return the |
| resulting content tree. |
| |
| <p> |
| This method is an <a href="#unmarshalGlobal">Unmarshal Global Root method</a>. |
| |
| <p> |
| 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 <code>reader</code> will be pointing at |
| the token right after the end event.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>reader</code> - The parser to be read.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the newly created root object of the java content tree.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="JAXBException.html" title="class in jakarta.xml.bind">JAXBException</a></code> - If any unexpected errors occur while unmarshalling</dd> |
| <dd><code><a href="UnmarshalException.html" title="class in jakarta.xml.bind">UnmarshalException</a></code> - If the <a href="ValidationEventHandler.html" title="interface in jakarta.xml.bind"><code>ValidationEventHandler</code></a> |
| returns false from its <code>handleEvent</code> method or the |
| <code>Unmarshaller</code> is unable to perform the XML to Java |
| binding. See <a href="#unmarshalEx">Unmarshalling XML Data</a></dd> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></code> - If the <code>reader</code> parameter is null</dd> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalStateException</a></code> - If <code>reader</code> is not pointing to a START_DOCUMENT or |
| START_ELEMENT event.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="#unmarshal(javax.xml.stream.XMLEventReader,java.lang.Class)"><code>unmarshal(javax.xml.stream.XMLEventReader, Class)</code></a></dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.6, JAXB 2.0</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="unmarshal(javax.xml.stream.XMLEventReader,java.lang.Class)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>unmarshal</h4> |
| <pre class="methodSignature"><T> <a href="JAXBElement.html" title="class in jakarta.xml.bind">JAXBElement</a><T> unmarshal​(<a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/stream/XMLEventReader.html?is-external=true" title="class or interface in javax.xml.stream" class="externalLink">XMLEventReader</a> reader, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><T> declaredType) |
| throws <a href="JAXBException.html" title="class in jakarta.xml.bind">JAXBException</a></pre> |
| <div class="block">Unmarshal root element to JAXB mapped <code>declaredType</code> |
| and return the resulting content tree. |
| |
| <p> |
| This method implements <a href="#unmarshalByDeclaredType">unmarshal by declaredType</a>. |
| |
| <p> |
| 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 <code>reader</code> will be pointing at |
| the token right after the end event.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>reader</code> - The parser to be read.</dd> |
| <dd><code>declaredType</code> - appropriate JAXB mapped class to hold <code>reader</code>'s START_ELEMENT XML data.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>content tree rooted by <a href="#unmarshalDeclaredTypeReturn">JAXB Element representation</a></dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="JAXBException.html" title="class in jakarta.xml.bind">JAXBException</a></code> - If any unexpected errors occur while unmarshalling</dd> |
| <dd><code><a href="UnmarshalException.html" title="class in jakarta.xml.bind">UnmarshalException</a></code> - If the <a href="ValidationEventHandler.html" title="interface in jakarta.xml.bind"><code>ValidationEventHandler</code></a> |
| returns false from its <code>handleEvent</code> method or the |
| <code>Unmarshaller</code> is unable to perform the XML to Java |
| binding. See <a href="#unmarshalEx">Unmarshalling XML Data</a></dd> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></code> - If any parameter is null</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.6, JAXB 2.0</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getUnmarshallerHandler()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getUnmarshallerHandler</h4> |
| <pre class="methodSignature"><a href="UnmarshallerHandler.html" title="interface in jakarta.xml.bind">UnmarshallerHandler</a> getUnmarshallerHandler()</pre> |
| <div class="block">Get an unmarshaller handler object that can be used as a component in |
| an XML pipeline. |
| |
| <p> |
| The JAXB 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 <code>UnmarshallerHandler</code>. If the |
| application needs to use more than one <code>UnmarshallerHandler</code>, it |
| should create more than one <code>Unmarshaller</code>.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the unmarshaller handler object</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="UnmarshallerHandler.html" title="interface in jakarta.xml.bind"><code>UnmarshallerHandler</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="setValidating(boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setValidating</h4> |
| <pre class="methodSignature">void setValidating​(boolean validating) |
| throws <a href="JAXBException.html" title="class in jakarta.xml.bind">JAXBException</a></pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">since JAXB2.0, please see <a href="#setSchema(javax.xml.validation.Schema)"><code>setSchema(javax.xml.validation.Schema)</code></a></div> |
| </div> |
| <div class="block">Specifies whether or not the default validation mechanism of the |
| <code>Unmarshaller</code> should validate during unmarshal operations. |
| By default, the <code>Unmarshaller</code> does not validate. |
| <p> |
| This method may only be invoked before or after calling one of the |
| unmarshal methods. |
| <p> |
| This method only controls the JAXB Provider's default unmarshal-time |
| validation mechanism - it has no impact on clients that specify their |
| own validating SAX 2.0 compliant parser. Clients that specify their |
| own unmarshal-time validation mechanism may wish to turn off the JAXB |
| Provider's default validation mechanism via this API to avoid "double |
| validation". |
| <p> |
| This method is deprecated as of JAXB 2.0 - please use the new |
| <a href="#setSchema(javax.xml.validation.Schema)"><code>setSchema(javax.xml.validation.Schema)</code></a> API.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>validating</code> - true if the Unmarshaller should validate during |
| unmarshal, false otherwise</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="JAXBException.html" title="class in jakarta.xml.bind">JAXBException</a></code> - if an error occurred while enabling or disabling |
| validation at unmarshal time</dd> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang" class="externalLink">UnsupportedOperationException</a></code> - could be thrown if this method is |
| invoked on an Unmarshaller created from a JAXBContext referencing |
| JAXB 2.0 mapped classes</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="isValidating()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isValidating</h4> |
| <pre class="methodSignature">boolean isValidating() |
| throws <a href="JAXBException.html" title="class in jakarta.xml.bind">JAXBException</a></pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">since JAXB2.0, please see <a href="#getSchema()"><code>getSchema()</code></a></div> |
| </div> |
| <div class="block">Indicates whether or not the <code>Unmarshaller</code> is configured to |
| validate during unmarshal operations. |
| <p> |
| This API returns the state of the JAXB Provider's default unmarshal-time |
| validation mechanism. |
| <p> |
| This method is deprecated as of JAXB 2.0 - please use the new |
| <a href="#getSchema()"><code>getSchema()</code></a> API.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if the Unmarshaller is configured to validate during |
| unmarshal operations, false otherwise</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="JAXBException.html" title="class in jakarta.xml.bind">JAXBException</a></code> - if an error occurs while retrieving the validating |
| flag</dd> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang" class="externalLink">UnsupportedOperationException</a></code> - could be thrown if this method is |
| invoked on an Unmarshaller created from a JAXBContext referencing |
| JAXB 2.0 mapped classes</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="setEventHandler(jakarta.xml.bind.ValidationEventHandler)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setEventHandler</h4> |
| <pre class="methodSignature">void setEventHandler​(<a href="ValidationEventHandler.html" title="interface in jakarta.xml.bind">ValidationEventHandler</a> handler) |
| throws <a href="JAXBException.html" title="class in jakarta.xml.bind">JAXBException</a></pre> |
| <div class="block">Allow an application to register a <code>ValidationEventHandler</code>. |
| <p> |
| The <code>ValidationEventHandler</code> will be called by the JAXB Provider |
| if any validation errors are encountered during calls to any of the |
| unmarshal methods. If the client application does not register a |
| <code>ValidationEventHandler</code> before invoking the unmarshal methods, |
| then <code>ValidationEvents</code> will be handled by the default event |
| handler which will terminate the unmarshal operation after the first |
| error or fatal error is encountered. |
| <p> |
| Calling this method with a null parameter will cause the Unmarshaller |
| to revert back to the default event handler.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>handler</code> - the validation event handler</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="JAXBException.html" title="class in jakarta.xml.bind">JAXBException</a></code> - if an error was encountered while setting the |
| event handler</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getEventHandler()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getEventHandler</h4> |
| <pre class="methodSignature"><a href="ValidationEventHandler.html" title="interface in jakarta.xml.bind">ValidationEventHandler</a> getEventHandler() |
| throws <a href="JAXBException.html" title="class in jakarta.xml.bind">JAXBException</a></pre> |
| <div class="block">Return the current event handler or the default event handler if one |
| hasn't been set.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the current ValidationEventHandler or the default event handler |
| if it hasn't been set</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="JAXBException.html" title="class in jakarta.xml.bind">JAXBException</a></code> - if an error was encountered while getting the |
| current event handler</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="setProperty(java.lang.String,java.lang.Object)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setProperty</h4> |
| <pre class="methodSignature">void setProperty​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a> value) |
| throws <a href="PropertyException.html" title="class in jakarta.xml.bind">PropertyException</a></pre> |
| <div class="block">Set the particular property in the underlying implementation of |
| <code>Unmarshaller</code>. This method can only be used to set one of |
| the standard JAXB defined properties above or a provider specific |
| property. Attempting to set an undefined property will result in |
| a PropertyException being thrown. See <a href="#supportedProps"> |
| Supported Properties</a>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - the name of the property to be set. This value can either |
| be specified using one of the constant fields or a user |
| supplied string.</dd> |
| <dd><code>value</code> - the value of the property to be set</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="PropertyException.html" title="class in jakarta.xml.bind">PropertyException</a></code> - when there is an error processing the given |
| property or value</dd> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></code> - If the name parameter is null</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getProperty(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getProperty</h4> |
| <pre class="methodSignature"><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a> getProperty​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> name) |
| throws <a href="PropertyException.html" title="class in jakarta.xml.bind">PropertyException</a></pre> |
| <div class="block">Get the particular property in the underlying implementation of |
| <code>Unmarshaller</code>. This method can only be used to get one of |
| the standard JAXB defined properties above or a provider specific |
| property. Attempting to get an undefined property will result in |
| a PropertyException being thrown. See <a href="#supportedProps"> |
| Supported Properties</a>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - the name of the property to retrieve</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the value of the requested property</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="PropertyException.html" title="class in jakarta.xml.bind">PropertyException</a></code> - when there is an error retrieving the given property or value |
| property name</dd> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></code> - If the name parameter is null</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="setSchema(javax.xml.validation.Schema)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setSchema</h4> |
| <pre class="methodSignature">void setSchema​(<a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/validation/Schema.html?is-external=true" title="class or interface in javax.xml.validation" class="externalLink">Schema</a> schema)</pre> |
| <div class="block">Specify the JAXP 1.3 <a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/validation/Schema.html?is-external=true" title="class or interface in javax.xml.validation" class="externalLink"><code>Schema</code></a> |
| object that should be used to validate subsequent unmarshal operations |
| against. Passing null into this method will disable validation. |
| <p> |
| This method replaces the deprecated <a href="#setValidating(boolean)"><code>setValidating(boolean)</code></a> |
| API. |
| |
| <p> |
| Initially this property is set to <code>null</code>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>schema</code> - Schema object to validate unmarshal operations against or null to disable validation</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang" class="externalLink">UnsupportedOperationException</a></code> - could be thrown if this method is |
| invoked on an Unmarshaller created from a JAXBContext referencing |
| JAXB 1.0 mapped classes</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.6, JAXB 2.0</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getSchema()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getSchema</h4> |
| <pre class="methodSignature"><a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/validation/Schema.html?is-external=true" title="class or interface in javax.xml.validation" class="externalLink">Schema</a> getSchema()</pre> |
| <div class="block">Get the JAXP 1.3 <a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/validation/Schema.html?is-external=true" title="class or interface in javax.xml.validation" class="externalLink"><code>Schema</code></a> object |
| being used to perform unmarshal-time validation. If there is no |
| Schema set on the unmarshaller, then this method will return null |
| indicating that unmarshal-time validation will not be performed. |
| <p> |
| This method provides replacement functionality for the deprecated |
| <a href="#isValidating()"><code>isValidating()</code></a> API as well as access to the Schema object. |
| To determine if the Unmarshaller has validation enabled, simply |
| test the return type for null: |
| <pre><code> |
| boolean isValidating = u.getSchema()!=null; |
| </code></pre></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the Schema object being used to perform unmarshal-time |
| validation or null if not present</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang" class="externalLink">UnsupportedOperationException</a></code> - could be thrown if this method is |
| invoked on an Unmarshaller created from a JAXBContext referencing |
| JAXB 1.0 mapped classes</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.6, JAXB 2.0</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="setAdapter(jakarta.xml.bind.annotation.adapters.XmlAdapter)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setAdapter</h4> |
| <pre class="methodSignature">void setAdapter​(<a href="annotation/adapters/XmlAdapter.html" title="class in jakarta.xml.bind.annotation.adapters">XmlAdapter</a> adapter)</pre> |
| <div class="block">Associates a configured instance of <a href="annotation/adapters/XmlAdapter.html" title="class in jakarta.xml.bind.annotation.adapters"><code>XmlAdapter</code></a> with this unmarshaller. |
| |
| <p> |
| This is a convenience method that invokes <code>setAdapter(adapter.getClass(),adapter);</code>.</div> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></code> - if the adapter parameter is null.</dd> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang" class="externalLink">UnsupportedOperationException</a></code> - if invoked agains a JAXB 1.0 implementation.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="#setAdapter(java.lang.Class,A)"><code>setAdapter(Class,XmlAdapter)</code></a></dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.6, JAXB 2.0</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="setAdapter(java.lang.Class,jakarta.xml.bind.annotation.adapters.XmlAdapter)"> |
| <!-- --> |
| </a><a id="setAdapter(java.lang.Class,A)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setAdapter</h4> |
| <pre class="methodSignature"><A extends <a href="annotation/adapters/XmlAdapter.html" title="class in jakarta.xml.bind.annotation.adapters">XmlAdapter</a>> void setAdapter​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><A> type, |
| A adapter)</pre> |
| <div class="block">Associates a configured instance of <a href="annotation/adapters/XmlAdapter.html" title="class in jakarta.xml.bind.annotation.adapters"><code>XmlAdapter</code></a> with this unmarshaller. |
| |
| <p> |
| Every unmarshaller internally maintains a |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util" class="externalLink"><code>Map</code></a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Class</code></a>,<a href="annotation/adapters/XmlAdapter.html" title="class in jakarta.xml.bind.annotation.adapters"><code>XmlAdapter</code></a>>, |
| which it uses for unmarshalling classes whose fields/methods are annotated |
| with <a href="annotation/adapters/XmlJavaTypeAdapter.html" title="annotation in jakarta.xml.bind.annotation.adapters"><code>XmlJavaTypeAdapter</code></a>. |
| |
| <p> |
| This method allows applications to use a configured instance of <a href="annotation/adapters/XmlAdapter.html" title="class in jakarta.xml.bind.annotation.adapters"><code>XmlAdapter</code></a>. |
| When an instance of an adapter is not given, an unmarshaller will create |
| one by invoking its default constructor.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>type</code> - The type of the adapter. The specified instance will be used when |
| <a href="annotation/adapters/XmlJavaTypeAdapter.html#value()"><code>XmlJavaTypeAdapter.value()</code></a> |
| refers to this type.</dd> |
| <dd><code>adapter</code> - The instance of the adapter to be used. If null, it will un-register |
| the current adapter set for this type.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></code> - if the type parameter is null.</dd> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang" class="externalLink">UnsupportedOperationException</a></code> - if invoked agains a JAXB 1.0 implementation.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.6, JAXB 2.0</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getAdapter(java.lang.Class)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getAdapter</h4> |
| <pre class="methodSignature"><A extends <a href="annotation/adapters/XmlAdapter.html" title="class in jakarta.xml.bind.annotation.adapters">XmlAdapter</a>> A getAdapter​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><A> type)</pre> |
| <div class="block">Gets the adapter associated with the specified type. |
| |
| This is the reverse operation of the <a href="#setAdapter(jakarta.xml.bind.annotation.adapters.XmlAdapter)"><code>setAdapter(jakarta.xml.bind.annotation.adapters.XmlAdapter)</code></a> method.</div> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></code> - if the type parameter is null.</dd> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang" class="externalLink">UnsupportedOperationException</a></code> - if invoked agains a JAXB 1.0 implementation.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.6, JAXB 2.0</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="setAttachmentUnmarshaller(jakarta.xml.bind.attachment.AttachmentUnmarshaller)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setAttachmentUnmarshaller</h4> |
| <pre class="methodSignature">void setAttachmentUnmarshaller​(<a href="attachment/AttachmentUnmarshaller.html" title="class in jakarta.xml.bind.attachment">AttachmentUnmarshaller</a> au)</pre> |
| <div class="block"><p>Associate a context that resolves cid's, content-id URIs, to |
| binary data passed as attachments.</p> |
| <p>Unmarshal time validation, enabled via <a href="#setSchema(javax.xml.validation.Schema)"><code>setSchema(Schema)</code></a>, |
| must be supported even when unmarshaller is performing XOP processing. |
| </p></div> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalStateException</a></code> - if attempt to concurrently call this |
| method during a unmarshal operation.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getAttachmentUnmarshaller()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getAttachmentUnmarshaller</h4> |
| <pre class="methodSignature"><a href="attachment/AttachmentUnmarshaller.html" title="class in jakarta.xml.bind.attachment">AttachmentUnmarshaller</a> getAttachmentUnmarshaller()</pre> |
| </li> |
| </ul> |
| <a id="setListener(jakarta.xml.bind.Unmarshaller.Listener)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setListener</h4> |
| <pre class="methodSignature">void setListener​(<a href="Unmarshaller.Listener.html" title="class in jakarta.xml.bind">Unmarshaller.Listener</a> listener)</pre> |
| <div class="block"><p> |
| Register unmarshal event callback <a href="Unmarshaller.Listener.html" title="class in jakarta.xml.bind"><code>Unmarshaller.Listener</code></a> with this <a href="Unmarshaller.html" title="interface in jakarta.xml.bind"><code>Unmarshaller</code></a>. |
| |
| <p> |
| There is only one Listener per Unmarshaller. Setting a Listener replaces the previous set Listener. |
| One can unregister current Listener by setting listener to <code>null</code>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>listener</code> - provides unmarshal event callbacks for this <a href="Unmarshaller.html" title="interface in jakarta.xml.bind"><code>Unmarshaller</code></a></dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.6, JAXB 2.0</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getListener()"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>getListener</h4> |
| <pre class="methodSignature"><a href="Unmarshaller.Listener.html" title="class in jakarta.xml.bind">Unmarshaller.Listener</a> getListener()</pre> |
| <div class="block"><p>Return <a href="Unmarshaller.Listener.html" title="class in jakarta.xml.bind"><code>Unmarshaller.Listener</code></a> registered with this <a href="Unmarshaller.html" title="interface in jakarta.xml.bind"><code>Unmarshaller</code></a>.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>registered <a href="Unmarshaller.Listener.html" title="class in jakarta.xml.bind"><code>Unmarshaller.Listener</code></a> or <code>null</code> |
| if no Listener is registered with this Unmarshaller.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.6, JAXB 2.0</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </div> |
| </div> |
| </main> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <footer role="contentinfo"> |
| <nav role="navigation"> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a id="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a id="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../index-all.html">Index</a></li> |
| <li><a href="../../../help-doc.html">Help</a></li> |
| </ul> |
| <div class="aboutLanguage">EclipseLink 3.0.0, API Reference</div> |
| </div> |
| <div class="subNav"> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../allclasses.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li><a href="#nested.class.summary">Nested</a> | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a id="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </nav> |
| <p class="legalCopy"><small>Copyright © 2017–2020 <a href="http://www.eclipse.org/eclipselink">Eclipse.org - EclipseLink Project</a>. All rights reserved.</small></p> |
| </footer> |
| </body> |
| </html> |