| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <title>JAXBContext</title> |
| <link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../script.js"></script> |
| |
| <link rel="shortcut icon" href="/img/jakarta-favicon.ico"> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="JAXBContext"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":10,"i1":10,"i2":10,"i3":6,"i4":6,"i5":10,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9}; |
| var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],8:["t4","Concrete Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../overview-summary.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> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../jakarta/xml/bind/JAXB.html" title="class in jakarta.xml.bind"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../jakarta/xml/bind/JAXBContextFactory.html" title="interface in jakarta.xml.bind"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../index.html?jakarta/xml/bind/JAXBContext.html" target="_top">Frames</a></li> |
| <li><a href="JAXBContext.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../allclasses-noframe.html">All Classes</a></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> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">jakarta.xml.bind</div> |
| <h2 title="Class JAXBContext" class="title">Class JAXBContext</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li>java.lang.Object</li> |
| <li> |
| <ul class="inheritance"> |
| <li>jakarta.xml.bind.JAXBContext</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <br> |
| <pre>public abstract class <span class="typeNameLabel">JAXBContext</span> |
| extends java.lang.Object</pre> |
| <div class="block">The <code>JAXBContext</code> class provides the client's entry point to the |
| Jakarta XML Binding API. It provides an abstraction for managing the XML/Java binding |
| information necessary to implement the Jakarta XML Binding binding framework operations: |
| unmarshal, marshal and validate. |
| |
| <p>A client application normally obtains new instances of this class using |
| one of these two styles for newInstance methods, although there are other |
| specialized forms of the method available: |
| |
| <ul> |
| <li><a href="../../../jakarta/xml/bind/JAXBContext.html#newInstance-java.lang.String-java.lang.ClassLoader-"><code>JAXBContext.newInstance( "com.acme.foo:com.acme.bar" )</code></a> <br> |
| The JAXBContext instance is initialized from a list of colon |
| separated Java package names. Each java package contains |
| Jakarta XML Binding mapped classes, schema-derived classes and/or user annotated |
| classes. Additionally, the java package may contain Jakarta XML Binding package annotations |
| that must be processed. (see JLS, Section 7.4.1 "Named Packages"). |
| </li> |
| <li><a href="../../../jakarta/xml/bind/JAXBContext.html#newInstance-java.lang.Class...-"><code>JAXBContext.newInstance( com.acme.foo.Foo.class )</code></a> <br> |
| The JAXBContext instance is initialized with class(es) |
| passed as parameter(s) and classes that are statically reachable from |
| these class(es). See <a href="../../../jakarta/xml/bind/JAXBContext.html#newInstance-java.lang.Class...-"><code>newInstance(Class...)</code></a> for details. |
| </li> |
| </ul> |
| |
| <p><i> |
| The provider must call the |
| <a href="../../../jakarta/xml/bind/DatatypeConverter.html#setDatatypeConverter-jakarta.xml.bind.DatatypeConverterInterface-"><code>DatatypeConverter.setDatatypeConverter</code></a> api prior to any client |
| invocations of the marshal and unmarshal methods. This is necessary to |
| configure the datatype converter that will be used during these operations.</i> |
| |
| <a id="Unmarshalling"></a> |
| <h2>Unmarshalling</h2> |
| <p> |
| The <a href="../../../jakarta/xml/bind/Unmarshaller.html" title="interface in jakarta.xml.bind"><code>Unmarshaller</code></a> class provides the client application the ability |
| to convert XML data into a tree of Java content objects. |
| The unmarshal method allows for |
| any global XML element declared in the schema to be unmarshalled as |
| the root of an instance document. |
| Additionally, the unmarshal method allows for an unrecognized root element that |
| has an xsi:type attribute's value that references a type definition declared in |
| the schema to be unmarshalled as the root of an instance document. |
| The <code>JAXBContext</code> object |
| allows the merging of global elements and type definitions across a set of schemas (listed |
| in the <code>contextPath</code>). Since each schema in the schema set can belong |
| to distinct namespaces, the unification of schemas to an unmarshalling |
| context must be namespace independent. This means that a client |
| application is able to unmarshal XML documents that are instances of |
| any of the schemas listed in the <code>contextPath</code>. For example: |
| |
| <pre> |
| JAXBContext jc = JAXBContext.newInstance( "com.acme.foo:com.acme.bar" ); |
| Unmarshaller u = jc.createUnmarshaller(); |
| FooObject fooObj = (FooObject)u.unmarshal( new File( "foo.xml" ) ); // ok |
| BarObject barObj = (BarObject)u.unmarshal( new File( "bar.xml" ) ); // ok |
| BazObject bazObj = (BazObject)u.unmarshal( new File( "baz.xml" ) ); // error, "com.acme.baz" not in contextPath |
| </pre> |
| |
| <p> |
| The client application may also generate Java content trees explicitly rather |
| than unmarshalling existing XML data. For all Jakarta XML Binding-annotated value classes, |
| an application can create content using constructors. |
| For schema-derived interface/implementation classes and for the |
| creation of elements that are not bound to a Jakarta XML Binding-annotated |
| class, an application needs to have access and knowledge about each of |
| the schema derived <code>ObjectFactory</code> classes that exist in each of |
| java packages contained in the <code>contextPath</code>. For each schema |
| derived java class, there is a static factory method that produces objects |
| of that type. For example, |
| assume that after compiling a schema, you have a package <code>com.acme.foo</code> |
| that contains a schema derived interface named <code>PurchaseOrder</code>. In |
| order to create objects of that type, the client application would use the |
| factory method like this: |
| |
| <pre> |
| com.acme.foo.PurchaseOrder po = |
| com.acme.foo.ObjectFactory.createPurchaseOrder(); |
| </pre> |
| |
| <p> |
| Once the client application has an instance of the the schema derived object, |
| it can use the mutator methods to set content on it. |
| |
| <p> |
| For more information on the generated <code>ObjectFactory</code> classes, see |
| Section 4.2 <i>Java Package</i> of the specification. |
| |
| <p> |
| <i>The provider must generate a class in each |
| package that contains all of the necessary object factory methods for that |
| package named ObjectFactory as well as the static |
| <code>newInstance( javaContentInterface )</code> method</i> |
| |
| <h3>Marshalling</h3> |
| <p> |
| The <a href="../../../jakarta/xml/bind/Marshaller.html" title="interface in jakarta.xml.bind"><code>Marshaller</code></a> class provides the client application the ability |
| to convert a Java content tree back into XML data. There is no difference |
| between marshalling a content tree that is created manually using the factory |
| methods and marshalling a content tree that is the result an <code>unmarshal</code> |
| operation. Clients can marshal a java content tree back to XML data |
| to a <code>java.io.OutputStream</code> or a <code>java.io.Writer</code>. The |
| marshalling process can alternatively produce SAX2 event streams to a |
| registered <code>ContentHandler</code> or produce a DOM Node object. |
| Client applications have control over the output encoding as well as |
| whether or not to marshal the XML data as a complete document or |
| as a fragment. |
| |
| <p> |
| Here is a simple example that unmarshals an XML document and then marshals |
| it back out: |
| |
| <pre> |
| JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" ); |
| |
| // unmarshal from foo.xml |
| Unmarshaller u = jc.createUnmarshaller(); |
| FooObject fooObj = (FooObject)u.unmarshal( new File( "foo.xml" ) ); |
| |
| // marshal to System.out |
| Marshaller m = jc.createMarshaller(); |
| m.marshal( fooObj, System.out ); |
| </pre> |
| |
| |
| <h3>Validation</h3> |
| <p> |
| In Jakarta XML Binding, the <a href="../../../jakarta/xml/bind/Unmarshaller.html" title="interface in jakarta.xml.bind"><code>Unmarshaller</code></a> has included convenience methods that expose |
| the JAXP <code>javax.xml.validation</code> framework. Please refer to the |
| <a href="../../../jakarta/xml/bind/Unmarshaller.html#setSchema-javax.xml.validation.Schema-"><code>Unmarshaller.setSchema(javax.xml.validation.Schema)</code></a> API for more |
| information. |
| |
| |
| <h3>Jakarta XML Binding Runtime Framework Compatibility</h3> |
| <p> |
| The following JAXB 1.0 restriction only applies to binding schema to |
| interfaces/implementation classes. |
| Since this binding does not require a common runtime system, a Jakarta XML Binding |
| client application must not attempt to mix runtime objects (<code>JAXBContext, |
| Marshaller</code>, etc. ) from different providers. This does not |
| mean that the client application isn't portable, it simply means that a |
| client has to use a runtime system provided by the same provider that was |
| used to compile the schema. |
| |
| |
| <h3>Discovery of Jakarta XML Binding implementation</h3> |
| <p> |
| To create an instance of <a href="../../../jakarta/xml/bind/JAXBContext.html" title="class in jakarta.xml.bind"><code>JAXBContext</code></a>, one of <code>JAXBContext.newInstance(...)</code> methods is invoked. After |
| JAX-B implementation is discovered, call is delegated to appropriate provider's method <code>createContext(...)</code> |
| passing parameters from the original call. |
| <p> |
| JAX-B implementation discovery happens each time <code>JAXBContext.newInstance</code> is invoked. If there is no user |
| specific configuration provided, default JAX-B provider must be returned. |
| <p> |
| Implementation discovery consists of following steps: |
| |
| <ol> |
| |
| <li> |
| If the system property <a href="../../../jakarta/xml/bind/JAXBContext.html#JAXB_CONTEXT_FACTORY"><code>JAXB_CONTEXT_FACTORY</code></a> exists, then its value is assumed to be the provider |
| factory class. This phase of the look up enables per-JVM override of the Jakarta XML Binding implementation. |
| |
| <li> |
| If the property <a href="../../../jakarta/xml/bind/JAXBContext.html#JAXB_CONTEXT_FACTORY"><code>JAXB_CONTEXT_FACTORY</code></a> exists in the <code>Map<String, ?></code> passed to <a href="../../../jakarta/xml/bind/JAXBContext.html#newInstance-java.lang.Class:A-java.util.Map-"><code>newInstance(Class[], Map)</code></a> |
| or to <a href="../../../jakarta/xml/bind/JAXBContext.html#newInstance-java.lang.String-java.lang.ClassLoader-java.util.Map-"><code>newInstance(String, ClassLoader, Map)</code></a>, then its value is assumed to be the fully qualified provider factory class name. |
| This phase of the look up enables context sensitive selection of the Jakarta XML Binding implementation. |
| |
| <li> |
| Provider of <a href="../../../jakarta/xml/bind/JAXBContextFactory.html" title="interface in jakarta.xml.bind"><code>JAXBContextFactory</code></a> is loaded using the service-provider loading |
| facilities, defined by the <code>ServiceLoader</code> class, to attempt |
| to locate and load an implementation of the service using the default loading mechanism: the service-provider loading facility |
| will use the current thread's context class loader |
| to attempt to load the context factory. If the context class loader is null, the |
| system class loader will be used. |
| <br> |
| In case of <code>service |
| configuration error</code> a <a href="../../../jakarta/xml/bind/JAXBException.html" title="class in jakarta.xml.bind"><code>JAXBException</code></a> will be thrown. |
| |
| <li> |
| Finally, if all the steps above fail, then the rest of the look up is unspecified. That said, |
| the recommended behavior is to simply look for some hard-coded platform default Jakarta XML Binding implementation. |
| This phase of the look up is so that the environment can have its own Jakarta XML Binding implementation as the last resort. |
| </ol> |
| |
| <p> |
| Once the provider factory class is discovered, context creation is delegated to one of its |
| <code>createContext(...)</code> methods.</div> |
| <dl> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.6, JAXB 1.0</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../jakarta/xml/bind/Marshaller.html" title="interface in jakarta.xml.bind"><code>Marshaller</code></a>, |
| <a href="../../../jakarta/xml/bind/Unmarshaller.html" title="interface in jakarta.xml.bind"><code>Unmarshaller</code></a>, |
| <a href="http://docs.oracle.com/javase/specs/jls/se7/html/jls-7.html#jls-7.4.1">S 7.4.1 "Named Packages" |
| in Java Language Specification</a></dd> |
| <dt><span class="simpleTagLabel">Examples (en):</span></dt> |
| <dd><a href="../../../../../../tomee-9.0/examples/rest-on-ejb.html">rest-on-ejb</a>, <a href="../../../../../../tomee-9.0/examples/applicationcomposer-jaxws-cdi.html">applicationcomposer-jaxws-cdi</a></dd> |
| <dt><span class="simpleTagLabel">Examples (pt):</span></dt> |
| <dd><a href="../../../../../../tomee-9.0/pt/examples/applicationcomposer-jaxws-cdi.html">applicationcomposer-jaxws-cdi</a></dd> |
| </dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field.summary"> |
| <!-- --> |
| </a> |
| <h3>Field Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> |
| <caption><span>Fields</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Field and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static java.lang.String</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/xml/bind/JAXBContext.html#JAXB_CONTEXT_FACTORY">JAXB_CONTEXT_FACTORY</a></span></code> |
| <div class="block">The name of the property that contains the name of the class capable |
| of creating new <code>JAXBContext</code> objects.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier</th> |
| <th class="colLast" scope="col">Constructor and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected </code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/xml/bind/JAXBContext.html#JAXBContext--">JAXBContext</a></span>()</code> </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></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="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code><a href="../../../jakarta/xml/bind/Binder.html" title="class in jakarta.xml.bind">Binder</a><org.w3c.dom.Node></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/xml/bind/JAXBContext.html#createBinder--">createBinder</a></span>()</code> |
| <div class="block">Creates a <code>Binder</code> for W3C DOM.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code><T> <a href="../../../jakarta/xml/bind/Binder.html" title="class in jakarta.xml.bind">Binder</a><T></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/xml/bind/JAXBContext.html#createBinder-java.lang.Class-">createBinder</a></span>(java.lang.Class<T> domType)</code> |
| <div class="block">Creates a <code>Binder</code> object that can be used for |
| associative/in-place unmarshalling/marshalling.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code><a href="../../../jakarta/xml/bind/JAXBIntrospector.html" title="class in jakarta.xml.bind">JAXBIntrospector</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/xml/bind/JAXBContext.html#createJAXBIntrospector--">createJAXBIntrospector</a></span>()</code> |
| <div class="block">Creates a <code>JAXBIntrospector</code> object that can be used to |
| introspect Jakarta XML Binding objects.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>abstract <a href="../../../jakarta/xml/bind/Marshaller.html" title="interface in jakarta.xml.bind">Marshaller</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/xml/bind/JAXBContext.html#createMarshaller--">createMarshaller</a></span>()</code> |
| <div class="block">Create a <code>Marshaller</code> object that can be used to convert a |
| java content tree into XML data.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>abstract <a href="../../../jakarta/xml/bind/Unmarshaller.html" title="interface in jakarta.xml.bind">Unmarshaller</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/xml/bind/JAXBContext.html#createUnmarshaller--">createUnmarshaller</a></span>()</code> |
| <div class="block">Create an <code>Unmarshaller</code> object that can be used to convert XML |
| data into a java content tree.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/xml/bind/JAXBContext.html#generateSchema-jakarta.xml.bind.SchemaOutputResolver-">generateSchema</a></span>(<a href="../../../jakarta/xml/bind/SchemaOutputResolver.html" title="class in jakarta.xml.bind">SchemaOutputResolver</a> outputResolver)</code> |
| <div class="block">Generates the schema documents for this context.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../jakarta/xml/bind/JAXBContext.html" title="class in jakarta.xml.bind">JAXBContext</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/xml/bind/JAXBContext.html#newInstance-java.lang.Class...-">newInstance</a></span>(java.lang.Class<?>... classesToBeBound)</code> |
| <div class="block">Create a new instance of a <code>JAXBContext</code> class.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../jakarta/xml/bind/JAXBContext.html" title="class in jakarta.xml.bind">JAXBContext</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/xml/bind/JAXBContext.html#newInstance-java.lang.Class:A-java.util.Map-">newInstance</a></span>(java.lang.Class<?>[] classesToBeBound, |
| java.util.Map<java.lang.String,?> properties)</code> |
| <div class="block">Create a new instance of a <code>JAXBContext</code> class.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../jakarta/xml/bind/JAXBContext.html" title="class in jakarta.xml.bind">JAXBContext</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/xml/bind/JAXBContext.html#newInstance-java.lang.String-">newInstance</a></span>(java.lang.String contextPath)</code> |
| <div class="block">Create a new instance of a <code>JAXBContext</code> class.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../jakarta/xml/bind/JAXBContext.html" title="class in jakarta.xml.bind">JAXBContext</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/xml/bind/JAXBContext.html#newInstance-java.lang.String-java.lang.ClassLoader-">newInstance</a></span>(java.lang.String contextPath, |
| java.lang.ClassLoader classLoader)</code> |
| <div class="block">Create a new instance of a <code>JAXBContext</code> class.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../jakarta/xml/bind/JAXBContext.html" title="class in jakarta.xml.bind">JAXBContext</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/xml/bind/JAXBContext.html#newInstance-java.lang.String-java.lang.ClassLoader-java.util.Map-">newInstance</a></span>(java.lang.String contextPath, |
| java.lang.ClassLoader classLoader, |
| java.util.Map<java.lang.String,?> properties)</code> |
| <div class="block">Create a new instance of a <code>JAXBContext</code> class.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.Object</h3> |
| <code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ FIELD DETAIL =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field.detail"> |
| <!-- --> |
| </a> |
| <h3>Field Detail</h3> |
| <a name="JAXB_CONTEXT_FACTORY"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>JAXB_CONTEXT_FACTORY</h4> |
| <pre>public static final java.lang.String JAXB_CONTEXT_FACTORY</pre> |
| <div class="block">The name of the property that contains the name of the class capable |
| of creating new <code>JAXBContext</code> objects.</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../constant-values.html#jakarta.xml.bind.JAXBContext.JAXB_CONTEXT_FACTORY">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a name="JAXBContext--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>JAXBContext</h4> |
| <pre>protected JAXBContext()</pre> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="newInstance-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>newInstance</h4> |
| <pre>public static <a href="../../../jakarta/xml/bind/JAXBContext.html" title="class in jakarta.xml.bind">JAXBContext</a> newInstance(java.lang.String contextPath) |
| throws <a href="../../../jakarta/xml/bind/JAXBException.html" title="class in jakarta.xml.bind">JAXBException</a></pre> |
| <div class="block">Create a new instance of a <code>JAXBContext</code> class. |
| |
| <p> |
| This is a convenience method to invoke the |
| <a href="../../../jakarta/xml/bind/JAXBContext.html#newInstance-java.lang.String-java.lang.ClassLoader-"><code>newInstance(String,ClassLoader)</code></a> method with |
| the context class loader of the current thread.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>contextPath</code> - the context path</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the new instance of a <code>JAXBContext</code> class</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../../../jakarta/xml/bind/JAXBException.html" title="class in jakarta.xml.bind">JAXBException</a></code> - if an error was encountered while creating the |
| <code>JAXBContext</code> such as |
| <ol> |
| <li>failure to locate either ObjectFactory.class or jaxb.index in the packages</li> |
| <li>an ambiguity among global elements contained in the contextPath</li> |
| <li>failure to locate a value for the context factory provider property</li> |
| <li>mixing schema derived packages from different providers on the same contextPath</li> |
| <li>packages are not open to <code>jakarta.xml.bind</code> module</li> |
| </ol></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="newInstance-java.lang.String-java.lang.ClassLoader-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>newInstance</h4> |
| <pre>public static <a href="../../../jakarta/xml/bind/JAXBContext.html" title="class in jakarta.xml.bind">JAXBContext</a> newInstance(java.lang.String contextPath, |
| java.lang.ClassLoader classLoader) |
| throws <a href="../../../jakarta/xml/bind/JAXBException.html" title="class in jakarta.xml.bind">JAXBException</a></pre> |
| <div class="block">Create a new instance of a <code>JAXBContext</code> class. |
| |
| <p> |
| The client application must supply a context path which is a list of |
| colon (':', \u003A) separated java package names that contain |
| schema-derived classes and/or fully qualified Jakarta XML Binding-annotated classes. |
| Schema-derived |
| code is registered with the JAXBContext by the |
| ObjectFactory.class generated per package. |
| Alternatively than being listed in the context path, programmer |
| annotated Jakarta XML Binding mapped classes can be listed in a |
| <code>jaxb.index</code> resource file, format described below. |
| Note that a java package can contain both schema-derived classes and |
| user annotated Jakarta XML Binding classes. Additionally, the java package may |
| contain Jakarta XML Binding package annotations that must be processed. (see JLS, |
| Section 7.4.1 "Named Packages"). |
| </p> |
| |
| <p> |
| Every package listed on the contextPath must meet <b>one or both</b> of the |
| following conditions otherwise a <code>JAXBException</code> will be thrown: |
| </p> |
| <ol> |
| <li>it must contain ObjectFactory.class</li> |
| <li>it must contain jaxb.index</li> |
| </ol> |
| |
| <p> |
| <b>Format for jaxb.index</b> |
| <p> |
| The file contains a newline-separated list of class names. |
| Space and tab characters, as well as blank |
| lines, are ignored. The comment character |
| is '#' (0x23); on each line all characters following the first comment |
| character are ignored. The file must be encoded in UTF-8. Classes that |
| are reachable, as defined in <a href="../../../jakarta/xml/bind/JAXBContext.html#newInstance-java.lang.Class...-"><code>newInstance(Class...)</code></a>, from the |
| listed classes are also registered with JAXBContext. |
| <p> |
| Constraints on class name occuring in a <code>jaxb.index</code> file are: |
| <ul> |
| <li>Must not end with ".class".</li> |
| <li>Class names are resolved relative to package containing |
| <code>jaxb.index</code> file. Only classes occuring directly in package |
| containing <code>jaxb.index</code> file are allowed.</li> |
| <li>Fully qualified class names are not allowed. |
| A qualified class name,relative to current package, |
| is only allowed to specify a nested or inner class.</li> |
| </ul> |
| |
| <p> |
| If there are any global XML element name collisions across the various |
| packages listed on the <code>contextPath</code>, a <code>JAXBException</code> |
| will be thrown. |
| |
| <p> |
| Mixing generated interface/impl bindings from multiple Jakarta XML Binding Providers |
| in the same context path may result in a <code>JAXBException</code> |
| being thrown. |
| |
| <p> |
| The steps involved in discovering the Jakarta XML Binding implementation is discussed in the class javadoc.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>contextPath</code> - List of java package names that contain schema |
| derived class and/or java to schema (Jakarta XML Binding-annotated) |
| mapped classes. |
| Packages in <code>contextPath</code> that are in named modules must be |
| <code>open</code> to at least the <code>jakarta.xml.bind</code> module.</dd> |
| <dd><code>classLoader</code> - This class loader will be used to locate the implementation |
| classes.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a new instance of a <code>JAXBContext</code></dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../../../jakarta/xml/bind/JAXBException.html" title="class in jakarta.xml.bind">JAXBException</a></code> - if an error was encountered while creating the |
| <code>JAXBContext</code> such as |
| <ol> |
| <li>failure to locate either ObjectFactory.class or jaxb.index in the packages</li> |
| <li>an ambiguity among global elements contained in the contextPath</li> |
| <li>failure to locate a value for the context factory provider property</li> |
| <li>mixing schema derived packages from different providers on the same contextPath</li> |
| <li>packages are not open to <code>jakarta.xml.bind</code> module</li> |
| </ol></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="newInstance-java.lang.String-java.lang.ClassLoader-java.util.Map-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>newInstance</h4> |
| <pre>public static <a href="../../../jakarta/xml/bind/JAXBContext.html" title="class in jakarta.xml.bind">JAXBContext</a> newInstance(java.lang.String contextPath, |
| java.lang.ClassLoader classLoader, |
| java.util.Map<java.lang.String,?> properties) |
| throws <a href="../../../jakarta/xml/bind/JAXBException.html" title="class in jakarta.xml.bind">JAXBException</a></pre> |
| <div class="block">Create a new instance of a <code>JAXBContext</code> class. |
| |
| <p> |
| This is mostly the same as <a href="../../../jakarta/xml/bind/JAXBContext.html#newInstance-java.lang.String-java.lang.ClassLoader-"><code>newInstance(String, ClassLoader)</code></a>, |
| but this version allows you to pass in provider-specific properties to configure |
| the instantiation of <a href="../../../jakarta/xml/bind/JAXBContext.html" title="class in jakarta.xml.bind"><code>JAXBContext</code></a>. |
| |
| <p> |
| The interpretation of properties is up to implementations. Implementations must |
| throw <code>JAXBException</code> if it finds properties that it doesn't understand.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>contextPath</code> - List of java package names that contain schema |
| derived class and/or java to schema (Jakarta XML Binding-annotated) |
| mapped classes. |
| Packages in <code>contextPath</code> that are in named modules must be |
| <code>open</code> to at least the <code>jakarta.xml.bind</code> module.</dd> |
| <dd><code>classLoader</code> - This class loader will be used to locate the implementation classes.</dd> |
| <dd><code>properties</code> - provider-specific or provider selection-specific properties. |
| Can be null, which means the same thing as passing in an empty map.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a new instance of a <code>JAXBContext</code></dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../../../jakarta/xml/bind/JAXBException.html" title="class in jakarta.xml.bind">JAXBException</a></code> - if an error was encountered while creating the |
| <code>JAXBContext</code> such as |
| <ol> |
| <li>failure to locate either ObjectFactory.class or jaxb.index in the packages</li> |
| <li>an ambiguity among global elements contained in the contextPath</li> |
| <li>failure to locate a value for the context factory provider property</li> |
| <li>mixing schema derived packages from different providers on the same contextPath</li> |
| <li>packages are not open to <code>jakarta.xml.bind</code> module</li> |
| </ol></dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.6, JAXB 2.0</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="newInstance-java.lang.Class...-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>newInstance</h4> |
| <pre>public static <a href="../../../jakarta/xml/bind/JAXBContext.html" title="class in jakarta.xml.bind">JAXBContext</a> newInstance(java.lang.Class<?>... classesToBeBound) |
| throws <a href="../../../jakarta/xml/bind/JAXBException.html" title="class in jakarta.xml.bind">JAXBException</a></pre> |
| <div class="block">Create a new instance of a <code>JAXBContext</code> class. |
| |
| <p> |
| The client application must supply a list of classes that the new |
| context object needs to recognize. |
| |
| Not only the new context will recognize all the classes specified, |
| but it will also recognize any classes that are directly/indirectly |
| referenced statically from the specified classes. Subclasses of |
| referenced classes nor <code>@XmlTransient</code> referenced classes |
| are not registered with JAXBContext. |
| |
| For example, in the following Java code, if you do |
| <code>newInstance(Foo.class)</code>, the newly created <a href="../../../jakarta/xml/bind/JAXBContext.html" title="class in jakarta.xml.bind"><code>JAXBContext</code></a> |
| will recognize both <code>Foo</code> and <code>Bar</code>, but not <code>Zot</code> or <code>FooBar</code>: |
| <pre> |
| class Foo { |
| @XmlTransient FooBar c; |
| Bar b; |
| } |
| class Bar { int x; } |
| class Zot extends Bar { int y; } |
| class FooBar { } |
| </pre> |
| |
| Therefore, a typical client application only needs to specify the |
| top-level classes, but it needs to be careful. |
| |
| <p> |
| Note that for each java package registered with JAXBContext, |
| when the optional package annotations exist, they must be processed. |
| (see JLS, Section 7.4.1 "Named Packages"). |
| |
| <p> |
| The steps involved in discovering the Jakarta XML Binding implementation is discussed in the class javadoc.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>classesToBeBound</code> - List of java classes to be recognized by the new <a href="../../../jakarta/xml/bind/JAXBContext.html" title="class in jakarta.xml.bind"><code>JAXBContext</code></a>. |
| Classes in <code>classesToBeBound</code> that are in named modules must be in a package |
| that is <code>open</code> to at least the <code>jakarta.xml.bind</code> module. |
| Can be empty, in which case a <a href="../../../jakarta/xml/bind/JAXBContext.html" title="class in jakarta.xml.bind"><code>JAXBContext</code></a> that only knows about |
| spec-defined classes will be returned.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>A new instance of a <code>JAXBContext</code>.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../../../jakarta/xml/bind/JAXBException.html" title="class in jakarta.xml.bind">JAXBException</a></code> - if an error was encountered while creating the |
| <code>JAXBContext</code>, such as (but not limited to): |
| <ol> |
| <li>No Jakarta XML Binding implementation was discovered |
| <li>Classes use Jakarta XML Binding annotations incorrectly |
| <li>Classes have colliding annotations (i.e., two classes with the same type name) |
| <li>The Jakarta XML Binding implementation was unable to locate |
| provider-specific out-of-band information (such as additional |
| files generated at the development time.) |
| <li><code>classesToBeBound</code> are not open to <code>jakarta.xml.bind</code> module |
| </ol></dd> |
| <dd><code>java.lang.IllegalArgumentException</code> - if the parameter contains <code>null</code> (i.e., <code>newInstance(null);</code>)</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.6, JAXB 2.0</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="newInstance-java.lang.Class:A-java.util.Map-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>newInstance</h4> |
| <pre>public static <a href="../../../jakarta/xml/bind/JAXBContext.html" title="class in jakarta.xml.bind">JAXBContext</a> newInstance(java.lang.Class<?>[] classesToBeBound, |
| java.util.Map<java.lang.String,?> properties) |
| throws <a href="../../../jakarta/xml/bind/JAXBException.html" title="class in jakarta.xml.bind">JAXBException</a></pre> |
| <div class="block">Create a new instance of a <code>JAXBContext</code> class. |
| |
| <p> |
| An overloading of <a href="../../../jakarta/xml/bind/JAXBContext.html#newInstance-java.lang.Class...-"><code>newInstance(Class...)</code></a> |
| to configure 'properties' for this instantiation of <a href="../../../jakarta/xml/bind/JAXBContext.html" title="class in jakarta.xml.bind"><code>JAXBContext</code></a>. |
| |
| <p> |
| The interpretation of properties is up to implementations. Implementations must |
| throw <code>JAXBException</code> if it finds properties that it doesn't understand.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>classesToBeBound</code> - List of java classes to be recognized by the new <a href="../../../jakarta/xml/bind/JAXBContext.html" title="class in jakarta.xml.bind"><code>JAXBContext</code></a>. |
| Classes in <code>classesToBeBound</code> that are in named modules must be in a package |
| that is <code>open</code> to at least the <code>jakarta.xml.bind</code> module. |
| Can be empty, in which case a <a href="../../../jakarta/xml/bind/JAXBContext.html" title="class in jakarta.xml.bind"><code>JAXBContext</code></a> that only knows about |
| spec-defined classes will be returned.</dd> |
| <dd><code>properties</code> - provider-specific or provider selection-specific properties. |
| Can be null, which means the same thing as passing in an empty map.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>A new instance of a <code>JAXBContext</code>.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../../../jakarta/xml/bind/JAXBException.html" title="class in jakarta.xml.bind">JAXBException</a></code> - if an error was encountered while creating the |
| <code>JAXBContext</code>, such as (but not limited to): |
| <ol> |
| <li>No Jakarta XML Binding implementation was discovered |
| <li>Classes use Jakarta XML Binding annotations incorrectly |
| <li>Classes have colliding annotations (i.e., two classes with the same type name) |
| <li>The Jakarta XML Binding implementation was unable to locate |
| provider-specific out-of-band information (such as additional |
| files generated at the development time.) |
| <li><code>classesToBeBound</code> are not open to <code>jakarta.xml.bind</code> module |
| </ol></dd> |
| <dd><code>java.lang.IllegalArgumentException</code> - if the parameter contains <code>null</code> (i.e., <code>newInstance(null,someMap);</code>)</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.6, JAXB 2.0</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="createUnmarshaller--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createUnmarshaller</h4> |
| <pre>public abstract <a href="../../../jakarta/xml/bind/Unmarshaller.html" title="interface in jakarta.xml.bind">Unmarshaller</a> createUnmarshaller() |
| throws <a href="../../../jakarta/xml/bind/JAXBException.html" title="class in jakarta.xml.bind">JAXBException</a></pre> |
| <div class="block">Create an <code>Unmarshaller</code> object that can be used to convert XML |
| data into a java content tree.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>an <code>Unmarshaller</code> object</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../../../jakarta/xml/bind/JAXBException.html" title="class in jakarta.xml.bind">JAXBException</a></code> - if an error was encountered while creating the |
| <code>Unmarshaller</code> object</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="createMarshaller--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createMarshaller</h4> |
| <pre>public abstract <a href="../../../jakarta/xml/bind/Marshaller.html" title="interface in jakarta.xml.bind">Marshaller</a> createMarshaller() |
| throws <a href="../../../jakarta/xml/bind/JAXBException.html" title="class in jakarta.xml.bind">JAXBException</a></pre> |
| <div class="block">Create a <code>Marshaller</code> object that can be used to convert a |
| java content tree into XML data.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a <code>Marshaller</code> object</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../../../jakarta/xml/bind/JAXBException.html" title="class in jakarta.xml.bind">JAXBException</a></code> - if an error was encountered while creating the |
| <code>Marshaller</code> object</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="createBinder-java.lang.Class-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createBinder</h4> |
| <pre>public <T> <a href="../../../jakarta/xml/bind/Binder.html" title="class in jakarta.xml.bind">Binder</a><T> createBinder(java.lang.Class<T> domType)</pre> |
| <div class="block">Creates a <code>Binder</code> object that can be used for |
| associative/in-place unmarshalling/marshalling.</div> |
| <dl> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>T</code> - the DOM API type</dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>domType</code> - select the DOM API to use by passing in its DOM Node class</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>always a new valid <code>Binder</code> object.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.UnsupportedOperationException</code> - if DOM API corresponding to <code>domType</code> is not supported by |
| the implementation.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.6, JAXB 2.0</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="createBinder--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createBinder</h4> |
| <pre>public <a href="../../../jakarta/xml/bind/Binder.html" title="class in jakarta.xml.bind">Binder</a><org.w3c.dom.Node> createBinder()</pre> |
| <div class="block">Creates a <code>Binder</code> for W3C DOM.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>always a new valid <code>Binder</code> object.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.6, JAXB 2.0</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="createJAXBIntrospector--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createJAXBIntrospector</h4> |
| <pre>public <a href="../../../jakarta/xml/bind/JAXBIntrospector.html" title="class in jakarta.xml.bind">JAXBIntrospector</a> createJAXBIntrospector()</pre> |
| <div class="block">Creates a <code>JAXBIntrospector</code> object that can be used to |
| introspect Jakarta XML Binding objects.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>always return a non-null valid <code>JAXBIntrospector</code> object.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.UnsupportedOperationException</code> - Calling this method on JAXB 1.0 implementations will throw |
| an UnsupportedOperationException.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.6, JAXB 2.0</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="generateSchema-jakarta.xml.bind.SchemaOutputResolver-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>generateSchema</h4> |
| <pre>public void generateSchema(<a href="../../../jakarta/xml/bind/SchemaOutputResolver.html" title="class in jakarta.xml.bind">SchemaOutputResolver</a> outputResolver) |
| throws java.io.IOException</pre> |
| <div class="block">Generates the schema documents for this context.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>outputResolver</code> - this object controls the output to which schemas |
| will be sent.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code> - if <a href="../../../jakarta/xml/bind/SchemaOutputResolver.html" title="class in jakarta.xml.bind"><code>SchemaOutputResolver</code></a> throws an <code>IOException</code>.</dd> |
| <dd><code>java.lang.UnsupportedOperationException</code> - Calling this method on JAXB 1.0 implementations will throw |
| an UnsupportedOperationException.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.6, JAXB 2.0</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../overview-summary.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> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../jakarta/xml/bind/JAXB.html" title="class in jakarta.xml.bind"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../jakarta/xml/bind/JAXBContextFactory.html" title="interface in jakarta.xml.bind"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../index.html?jakarta/xml/bind/JAXBContext.html" target="_top">Frames</a></li> |
| <li><a href="JAXBContext.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../allclasses-noframe.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> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </body> |
| </html> |