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 againstJAXBException
SAXException
public static Marshaller getMarshaller(String pkgName) throws JAXBException
pkgName
- The package name for the jaxb contextJAXBException
public static Unmarshaller getUnmarshaller(String pkgName) throws JAXBException
pkgName
- The package name for the jaxb contextJAXBException
public static Unmarshaller getUnmarshaller(String... pkgNames) throws JAXBException
pkgNames
- JAXBException
public static Unmarshaller getValidatingUnmarshaller(String pkgName, String schemaLocation) throws JAXBException, SAXException
pkgName
- The package name for the jaxb contextschemaLocation
- location of the schema to validate againstJAXBException
SAXException
public static Unmarshaller getValidatingUnmarshaller(String[] pkgNames, String[] schemaLocations) throws JAXBException, SAXException, IOException
JAXBException
SAXException
IOException
public static JAXBContext getJAXBContext(String path) throws JAXBException
JAXBException
public static JAXBContext getJAXBContext(String... paths) throws JAXBException
JAXBException
public static JAXBContext getJAXBContext(Class<?> clazz) throws JAXBException
JAXBException
Copyright © 2017 JBoss by Red Hat. All rights reserved.