Package | Description |
---|---|
javax.xml.bind |
Provides a runtime binding framework for client applications including
unmarshalling, marshalling, and validation capabilities.
|
javax.xml.bind.helpers |
JAXB Provider Use Only: Provides partial default implementations for
some of the javax.xml.bind interfaces.
|
javax.xml.bind.util |
Useful client utility classes.
|
Modifier and Type | Class and Description |
---|---|
class |
MarshalException
This exception indicates that an error has occurred while performing
a marshal operation that the provider is unable to recover from.
|
class |
PropertyException
This exception indicates that an error was encountered while getting or
setting a property.
|
class |
UnmarshalException
This exception indicates that an error has occurred while performing
an unmarshal operation that prevents the JAXB Provider from completing
the operation.
|
class |
ValidationException
This exception indicates that an error has occurred while performing
a validate operation.
|
Modifier and Type | Method and Description |
---|---|
private static JAXBException |
ContextFinder.handleClassCastException(java.lang.Class originalType,
java.lang.Class targetType)
Determine if two types (JAXBContext in this case) will generate a ClassCastException.
|
Modifier and Type | Method and Description |
---|---|
abstract Marshaller |
JAXBContext.createMarshaller()
Create a Marshaller object that can be used to convert a
java content tree into XML data.
|
abstract Unmarshaller |
JAXBContext.createUnmarshaller()
Create an Unmarshaller object that can be used to convert XML
data into a java content tree.
|
abstract Validator |
JAXBContext.createValidator()
Deprecated.
since JAXB2.0
|
(package private) static JAXBContext |
ContextFinder.find(java.lang.Class[] classes,
java.util.Map properties) |
(package private) static JAXBContext |
ContextFinder.find(java.lang.String factoryId,
java.lang.String contextPath,
java.lang.ClassLoader classLoader,
java.util.Map properties) |
private static <T> JAXBContext |
JAXB.getContext(java.lang.Class<T> type)
Obtains the
JAXBContext from the given type,
by using the cache if possible. |
ValidationEventHandler |
Validator.getEventHandler()
Deprecated.
since JAXB2.0
|
abstract ValidationEventHandler |
Binder.getEventHandler()
Return the current event handler or the default event handler if one
hasn't been set.
|
ValidationEventHandler |
Unmarshaller.getEventHandler()
Return the current event handler or the default event handler if one
hasn't been set.
|
ValidationEventHandler |
Marshaller.getEventHandler()
Return the current event handler or the default event handler if one
hasn't been set.
|
org.w3c.dom.Node |
Marshaller.getNode(java.lang.Object contentTree)
Get a DOM tree view of the content tree(Optional).
|
java.lang.Object |
UnmarshallerHandler.getResult()
Obtains the unmarshalled result.
|
private static void |
ContextFinder.handleInvocationTargetException(java.lang.reflect.InvocationTargetException x)
If the
InvocationTargetException wraps an exception that shouldn't be wrapped,
throw the wrapped exception. |
boolean |
Unmarshaller.isValidating()
Deprecated.
since JAXB2.0, please see
Unmarshaller.getSchema() |
private static java.util.Properties |
ContextFinder.loadJAXBProperties(java.lang.ClassLoader classLoader,
java.lang.String propFileName) |
void |
Marshaller.marshal(java.lang.Object jaxbElement,
org.xml.sax.ContentHandler handler)
Marshal the content tree rooted at jaxbElement into SAX2 events.
|
void |
Marshaller.marshal(java.lang.Object jaxbElement,
java.io.File output)
Marshal the content tree rooted at jaxbElement into a file.
|
void |
Marshaller.marshal(java.lang.Object jaxbElement,
org.w3c.dom.Node node)
Marshal the content tree rooted at jaxbElement into a DOM tree.
|
void |
Marshaller.marshal(java.lang.Object jaxbElement,
java.io.OutputStream os)
Marshal the content tree rooted at jaxbElement into an output stream.
|
void |
Marshaller.marshal(java.lang.Object jaxbElement,
javax.xml.transform.Result result)
Marshal the content tree rooted at jaxbElement into the specified
javax.xml.transform.Result.
|
void |
Marshaller.marshal(java.lang.Object jaxbElement,
java.io.Writer writer)
Marshal the content tree rooted at jaxbElement into a Writer.
|
void |
Marshaller.marshal(java.lang.Object jaxbElement,
javax.xml.stream.XMLEventWriter writer)
Marshal the content tree rooted at jaxbElement into a
XMLEventWriter . |
abstract void |
Binder.marshal(java.lang.Object jaxbObject,
XmlNode xmlNode)
Marshal a JAXB object tree to a new XML document.
|
void |
Marshaller.marshal(java.lang.Object jaxbElement,
javax.xml.stream.XMLStreamWriter writer)
Marshal the content tree rooted at jaxbElement into a
XMLStreamWriter . |
static JAXBContext |
JAXBContext.newInstance(java.lang.Class... classesToBeBound)
Obtain a new instance of a JAXBContext class.
|
static JAXBContext |
JAXBContext.newInstance(java.lang.Class[] classesToBeBound,
java.util.Map<java.lang.String,?> properties)
Obtain a new instance of a JAXBContext class.
|
(package private) static JAXBContext |
ContextFinder.newInstance(java.lang.Class[] classes,
java.util.Map properties,
java.lang.Class spFactory) |
(package private) static JAXBContext |
ContextFinder.newInstance(java.lang.Class[] classes,
java.util.Map properties,
java.lang.String className)
Create an instance of a class using the thread context ClassLoader
|
static JAXBContext |
JAXBContext.newInstance(java.lang.String contextPath)
Obtain a new instance of a JAXBContext class.
|
(package private) static JAXBContext |
ContextFinder.newInstance(java.lang.String contextPath,
java.lang.Class spFactory,
java.lang.ClassLoader classLoader,
java.util.Map properties) |
static JAXBContext |
JAXBContext.newInstance(java.lang.String contextPath,
java.lang.ClassLoader classLoader)
Obtain a new instance of a JAXBContext class.
|
static JAXBContext |
JAXBContext.newInstance(java.lang.String contextPath,
java.lang.ClassLoader classLoader,
java.util.Map<java.lang.String,?> properties)
Obtain a new instance of a JAXBContext class.
|
(package private) static JAXBContext |
ContextFinder.newInstance(java.lang.String contextPath,
java.lang.String className,
java.lang.ClassLoader classLoader,
java.util.Map properties)
Create an instance of a class using the specified ClassLoader
|
void |
Validator.setEventHandler(ValidationEventHandler handler)
Deprecated.
since JAXB2.0
|
abstract void |
Binder.setEventHandler(ValidationEventHandler handler)
Allow an application to register a ValidationEventHandler.
|
void |
Unmarshaller.setEventHandler(ValidationEventHandler handler)
Allow an application to register a ValidationEventHandler.
|
void |
Marshaller.setEventHandler(ValidationEventHandler handler)
Allow an application to register a validation event handler.
|
void |
Unmarshaller.setValidating(boolean validating)
Deprecated.
since JAXB2.0, please see
Unmarshaller.setSchema(javax.xml.validation.Schema) |
java.lang.Object |
Unmarshaller.unmarshal(java.io.File f)
Unmarshal XML data from the specified file and return the resulting
content tree.
|
java.lang.Object |
Unmarshaller.unmarshal(org.xml.sax.InputSource source)
Unmarshal XML data from the specified SAX InputSource and return the
resulting content tree.
|
java.lang.Object |
Unmarshaller.unmarshal(java.io.InputStream is)
Unmarshal XML data from the specified InputStream and return the
resulting content tree.
|
java.lang.Object |
Unmarshaller.unmarshal(org.w3c.dom.Node node)
Unmarshal global XML data from the specified DOM tree and return the resulting
content tree.
|
<T> JAXBElement<T> |
Unmarshaller.unmarshal(org.w3c.dom.Node node,
java.lang.Class<T> declaredType)
Unmarshal XML data by JAXB mapped declaredType
and return the resulting content tree.
|
java.lang.Object |
Unmarshaller.unmarshal(java.io.Reader reader)
Unmarshal XML data from the specified Reader and return the
resulting content tree.
|
java.lang.Object |
Unmarshaller.unmarshal(javax.xml.transform.Source source)
Unmarshal XML data from the specified XML Source and return the
resulting content tree.
|
<T> JAXBElement<T> |
Unmarshaller.unmarshal(javax.xml.transform.Source source,
java.lang.Class<T> declaredType)
Unmarshal XML data from the specified XML Source by declaredType and return the
resulting content tree.
|
java.lang.Object |
Unmarshaller.unmarshal(java.net.URL url)
Unmarshal XML data from the specified URL and return the resulting
content tree.
|
java.lang.Object |
Unmarshaller.unmarshal(javax.xml.stream.XMLEventReader reader)
Unmarshal XML data from the specified pull parser and return the
resulting content tree.
|
<T> JAXBElement<T> |
Unmarshaller.unmarshal(javax.xml.stream.XMLEventReader reader,
java.lang.Class<T> declaredType)
Unmarshal root element to JAXB mapped declaredType
and return the resulting content tree.
|
abstract java.lang.Object |
Binder.unmarshal(XmlNode xmlNode)
Unmarshal XML infoset view to a JAXB object tree.
|
abstract <T> JAXBElement<T> |
Binder.unmarshal(XmlNode xmlNode,
java.lang.Class<T> declaredType)
Unmarshal XML root element by provided declaredType
to a JAXB object tree.
|
java.lang.Object |
Unmarshaller.unmarshal(javax.xml.stream.XMLStreamReader reader)
Unmarshal XML data from the specified pull parser and return the
resulting content tree.
|
<T> JAXBElement<T> |
Unmarshaller.unmarshal(javax.xml.stream.XMLStreamReader reader,
java.lang.Class<T> declaredType)
Unmarshal root element to JAXB mapped declaredType
and return the resulting content tree.
|
abstract java.lang.Object |
Binder.updateJAXB(XmlNode xmlNode)
Takes an XML node and updates its associated JAXB object and its descendants.
|
abstract XmlNode |
Binder.updateXML(java.lang.Object jaxbObject)
Takes an JAXB object and updates
its associated XML node and its descendants.
|
abstract XmlNode |
Binder.updateXML(java.lang.Object jaxbObject,
XmlNode xmlNode)
Changes in JAXB object tree are updated in its associated XML parse tree.
|
boolean |
Validator.validate(java.lang.Object subrootObj)
Deprecated.
since JAXB2.0
|
boolean |
Validator.validateRoot(java.lang.Object rootObj)
Deprecated.
since JAXB2.0
|
Constructor and Description |
---|
Cache(java.lang.Class type) |
Modifier and Type | Method and Description |
---|---|
ValidationEventHandler |
AbstractUnmarshallerImpl.getEventHandler()
Return the current event handler or the default event handler if one
hasn't been set.
|
ValidationEventHandler |
AbstractMarshallerImpl.getEventHandler() |
org.w3c.dom.Node |
AbstractMarshallerImpl.getNode(java.lang.Object obj)
By default, the getNode method is unsupported and throw
an
UnsupportedOperationException . |
protected org.xml.sax.XMLReader |
AbstractUnmarshallerImpl.getXMLReader()
Obtains a configured XMLReader.
|
boolean |
AbstractUnmarshallerImpl.isValidating()
Indicates whether or not the Unmarshaller is configured to validate
during unmarshal operations.
|
void |
AbstractMarshallerImpl.marshal(java.lang.Object obj,
org.xml.sax.ContentHandler handler) |
void |
AbstractMarshallerImpl.marshal(java.lang.Object jaxbElement,
java.io.File output) |
void |
AbstractMarshallerImpl.marshal(java.lang.Object obj,
org.w3c.dom.Node node) |
void |
AbstractMarshallerImpl.marshal(java.lang.Object obj,
java.io.OutputStream os) |
void |
AbstractMarshallerImpl.marshal(java.lang.Object obj,
java.io.Writer w) |
void |
AbstractMarshallerImpl.marshal(java.lang.Object obj,
javax.xml.stream.XMLEventWriter writer) |
void |
AbstractMarshallerImpl.marshal(java.lang.Object obj,
javax.xml.stream.XMLStreamWriter writer) |
void |
AbstractUnmarshallerImpl.setEventHandler(ValidationEventHandler handler)
Allow an application to register a validation event handler.
|
void |
AbstractMarshallerImpl.setEventHandler(ValidationEventHandler handler) |
void |
AbstractUnmarshallerImpl.setValidating(boolean validating)
Specifies whether or not the Unmarshaller should validate during
unmarshal operations.
|
java.lang.Object |
AbstractUnmarshallerImpl.unmarshal(java.io.File f) |
java.lang.Object |
AbstractUnmarshallerImpl.unmarshal(org.xml.sax.InputSource source) |
java.lang.Object |
AbstractUnmarshallerImpl.unmarshal(java.io.InputStream is) |
<T> JAXBElement<T> |
AbstractUnmarshallerImpl.unmarshal(org.w3c.dom.Node node,
java.lang.Class<T> expectedType) |
java.lang.Object |
AbstractUnmarshallerImpl.unmarshal(java.io.Reader reader) |
private java.lang.Object |
AbstractUnmarshallerImpl.unmarshal(javax.xml.transform.sax.SAXSource source) |
java.lang.Object |
AbstractUnmarshallerImpl.unmarshal(javax.xml.transform.Source source) |
<T> JAXBElement<T> |
AbstractUnmarshallerImpl.unmarshal(javax.xml.transform.Source source,
java.lang.Class<T> expectedType) |
private java.lang.Object |
AbstractUnmarshallerImpl.unmarshal(java.lang.String url) |
java.lang.Object |
AbstractUnmarshallerImpl.unmarshal(java.net.URL url) |
java.lang.Object |
AbstractUnmarshallerImpl.unmarshal(javax.xml.stream.XMLEventReader reader) |
<T> JAXBElement<T> |
AbstractUnmarshallerImpl.unmarshal(javax.xml.stream.XMLEventReader reader,
java.lang.Class<T> expectedType) |
protected abstract java.lang.Object |
AbstractUnmarshallerImpl.unmarshal(org.xml.sax.XMLReader reader,
org.xml.sax.InputSource source)
Unmarshals an object by using the specified XMLReader and the InputSource.
|
java.lang.Object |
AbstractUnmarshallerImpl.unmarshal(javax.xml.stream.XMLStreamReader reader) |
<T> JAXBElement<T> |
AbstractUnmarshallerImpl.unmarshal(javax.xml.stream.XMLStreamReader reader,
java.lang.Class<T> expectedType) |
Modifier and Type | Method and Description |
---|---|
private static Unmarshaller |
JAXBResult.assertionFailed()
Hook to throw exception from the middle of a contructor chained call
to this
|
private static Marshaller |
JAXBSource.assertionFailed(java.lang.String message)
Hook to throw exception from the middle of a contructor chained call
to this
|
java.lang.Object |
JAXBResult.getResult()
Gets the unmarshalled object created by the transformation.
|
Constructor and Description |
---|
JAXBResult(JAXBContext context)
Creates a new instance that uses the specified
JAXBContext to unmarshal.
|
JAXBResult(Unmarshaller _unmarshaller)
Creates a new instance that uses the specified
Unmarshaller to unmarshal an object.
|
JAXBSource(JAXBContext context,
java.lang.Object contentObject)
Creates a new
Source for the given content object. |
JAXBSource(Marshaller marshaller,
java.lang.Object contentObject)
Creates a new
Source for the given content object. |