public class JAXBUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
W3C_XML_SCHEMA_NS_URI |
| Constructor and Description |
|---|
JAXBUtil() |
| Modifier and Type | Method and Description |
|---|---|
static JAXBContext |
getJAXBContext(Class<?> clazz) |
static JAXBContext |
getJAXBContext(String... paths) |
static JAXBContext |
getJAXBContext(String path) |
static Marshaller |
getMarshaller(String pkgName)
Get the JAXB Marshaller
|
static Unmarshaller |
getUnmarshaller(String... pkgNames)
Get the JAXB Unmarshaller for a selected set of package names
|
static Unmarshaller |
getUnmarshaller(String pkgName)
Get the JAXB Unmarshaller
|
static Marshaller |
getValidatingMarshaller(String pkgName,
String schemaLocation)
Get the JAXB Marshaller
|
static Unmarshaller |
getValidatingUnmarshaller(String[] pkgNames,
String[] schemaLocations) |
static Unmarshaller |
getValidatingUnmarshaller(String pkgName,
String schemaLocation)
Get the JAXB Unmarshaller
|
public static final String W3C_XML_SCHEMA_NS_URI
public static Marshaller getValidatingMarshaller(String pkgName, String schemaLocation) throws JAXBException, SAXException
pkgName - The package name for the jaxb contextschemaLocation - location of the schema to validate againstJAXBExceptionSAXExceptionpublic static Marshaller getMarshaller(String pkgName) throws JAXBException
pkgName - The package name for the jaxb contextJAXBExceptionpublic static Unmarshaller getUnmarshaller(String pkgName) throws JAXBException
pkgName - The package name for the jaxb contextJAXBExceptionpublic static Unmarshaller getUnmarshaller(String... pkgNames) throws JAXBException
pkgNames - JAXBExceptionpublic static Unmarshaller getValidatingUnmarshaller(String pkgName, String schemaLocation) throws JAXBException, SAXException
pkgName - The package name for the jaxb contextschemaLocation - location of the schema to validate againstJAXBExceptionSAXExceptionpublic static Unmarshaller getValidatingUnmarshaller(String[] pkgNames, String[] schemaLocations) throws JAXBException, SAXException, IOException
JAXBExceptionSAXExceptionIOExceptionpublic static JAXBContext getJAXBContext(String path) throws JAXBException
JAXBExceptionpublic static JAXBContext getJAXBContext(String... paths) throws JAXBException
JAXBExceptionpublic static JAXBContext getJAXBContext(Class<?> clazz) throws JAXBException
JAXBExceptionCopyright © 2012 JBoss by Red Hat. All Rights Reserved.