public class JAXBUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
JAXBUtils.CONSTRUCTION_TYPE |
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_NAMESPACE_REMAP |
| Constructor and Description |
|---|
JAXBUtils() |
| Modifier and Type | Method and Description |
|---|---|
static javax.xml.bind.JAXBContext |
getJAXBContext(TreeSet<String> contextPackages)
Deprecated.
|
static javax.xml.bind.JAXBContext |
getJAXBContext(TreeSet<String> contextPackages,
ClassLoader cacheKey)
Deprecated.
|
static javax.xml.bind.JAXBContext |
getJAXBContext(TreeSet<String> contextPackages,
javax.xml.ws.Holder<JAXBUtils.CONSTRUCTION_TYPE> constructionType,
boolean forceArrays,
String key,
ClassLoader cacheKey,
Map<String,?> properties)
Get a JAXBContext for the class
Note: The contextPackage object is used by multiple threads.
|
static javax.xml.bind.JAXBContext |
getJAXBContext(TreeSet<String> contextPackages,
javax.xml.ws.Holder<JAXBUtils.CONSTRUCTION_TYPE> constructionType,
String key) |
static javax.xml.bind.JAXBContext |
getJAXBContext(TreeSet<String> contextPackages,
javax.xml.ws.Holder<JAXBUtils.CONSTRUCTION_TYPE> constructionType,
String key,
ClassLoader cacheKey,
Map<String,?> properties)
Get a JAXBContext for the class
Note: The contextPackage object is used by multiple threads.
|
static javax.xml.bind.JAXBIntrospector |
getJAXBIntrospector(javax.xml.bind.JAXBContext context)
get JAXB Introspector
|
static javax.xml.bind.Marshaller |
getJAXBMarshaller(javax.xml.bind.JAXBContext context)
Get JAXBMarshaller
|
static javax.xml.bind.Unmarshaller |
getJAXBUnmarshaller(javax.xml.bind.JAXBContext context)
Get the unmarshaller.
|
protected static List<String> |
pruneDirectives(TreeSet<String> contextPackages)
The contextPackages may declare overrides.
|
static void |
releaseJAXBIntrospector(javax.xml.bind.JAXBContext context,
javax.xml.bind.JAXBIntrospector introspector)
Release JAXBIntrospector Do not call this method if an exception occurred while using the
JAXBIntrospector.
|
static void |
releaseJAXBMarshaller(javax.xml.bind.JAXBContext context,
javax.xml.bind.Marshaller marshaller)
releaseJAXBMarshalller
Do not call this method if an exception occurred while using the
Marshaller.
|
static void |
releaseJAXBUnmarshaller(javax.xml.bind.JAXBContext context,
javax.xml.bind.Unmarshaller unmarshaller)
Release Unmarshaller Do not call this method if an exception occurred while using the
Unmarshaller.
|
public static final String DEFAULT_NAMESPACE_REMAP
public static javax.xml.bind.JAXBContext getJAXBContext(TreeSet<String> contextPackages) throws javax.xml.bind.JAXBException
contextPackage - Setjavax.xml.bind.JAXBExceptionpublic static javax.xml.bind.JAXBContext getJAXBContext(TreeSet<String> contextPackages, ClassLoader cacheKey) throws javax.xml.bind.JAXBException
contextPackage - SetcacheKey - ClassLoaderjavax.xml.bind.JAXBExceptionpublic static javax.xml.bind.JAXBContext getJAXBContext(TreeSet<String> contextPackages, javax.xml.ws.Holder<JAXBUtils.CONSTRUCTION_TYPE> constructionType, String key) throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic static javax.xml.bind.JAXBContext getJAXBContext(TreeSet<String> contextPackages, javax.xml.ws.Holder<JAXBUtils.CONSTRUCTION_TYPE> constructionType, String key, ClassLoader cacheKey, Map<String,?> properties) throws javax.xml.bind.JAXBException
contextPackage - SetcontructionType - (output value that indicates how the context was constructed)cacheKey - ClassLoaderjavax.xml.bind.JAXBExceptionpublic static javax.xml.bind.JAXBContext getJAXBContext(TreeSet<String> contextPackages, javax.xml.ws.Holder<JAXBUtils.CONSTRUCTION_TYPE> constructionType, boolean forceArrays, String key, ClassLoader cacheKey, Map<String,?> properties) throws javax.xml.bind.JAXBException
contextPackage - SetcontructionType - (output value that indicates how the context was constructed)forceArrays - (forces the returned JAXBContext to include the array types)cacheKey - ClassLoaderjavax.xml.bind.JAXBExceptionprotected static List<String> pruneDirectives(TreeSet<String> contextPackages)
contextPackages - public static javax.xml.bind.Unmarshaller getJAXBUnmarshaller(javax.xml.bind.JAXBContext context) throws javax.xml.bind.JAXBException
context - JAXBContextjavax.xml.bind.JAXBExceptionpublic static void releaseJAXBUnmarshaller(javax.xml.bind.JAXBContext context, javax.xml.bind.Unmarshaller unmarshaller)
context - JAXBContextunmarshaller - Unmarshallerpublic static javax.xml.bind.Marshaller getJAXBMarshaller(javax.xml.bind.JAXBContext context) throws javax.xml.bind.JAXBException
context - JAXBContextjavax.xml.bind.JAXBExceptionpublic static void releaseJAXBMarshaller(javax.xml.bind.JAXBContext context, javax.xml.bind.Marshaller marshaller)
context - JAXBContextmarshaller - Marshallerpublic static javax.xml.bind.JAXBIntrospector getJAXBIntrospector(javax.xml.bind.JAXBContext context) throws javax.xml.bind.JAXBException
context - JAXBContextjavax.xml.bind.JAXBExceptionpublic static void releaseJAXBIntrospector(javax.xml.bind.JAXBContext context, javax.xml.bind.JAXBIntrospector introspector)
context - JAXBContextintrospector - JAXBIntrospectorCopyright © 2004–2018 The Apache Software Foundation. All rights reserved.