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 JAXBContext |
getJAXBContext(TreeSet<String> contextPackages)
Deprecated.
|
static JAXBContext |
getJAXBContext(TreeSet<String> contextPackages,
ClassLoader cacheKey)
Deprecated.
|
static JAXBContext |
getJAXBContext(TreeSet<String> contextPackages,
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 JAXBContext |
getJAXBContext(TreeSet<String> contextPackages,
Holder<JAXBUtils.CONSTRUCTION_TYPE> constructionType,
String key) |
static JAXBContext |
getJAXBContext(TreeSet<String> contextPackages,
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 JAXBIntrospector |
getJAXBIntrospector(JAXBContext context)
get JAXB Introspector
|
static Marshaller |
getJAXBMarshaller(JAXBContext context)
Get JAXBMarshaller
|
static Unmarshaller |
getJAXBUnmarshaller(JAXBContext context)
Get the unmarshaller.
|
protected static List<String> |
pruneDirectives(TreeSet<String> contextPackages)
The contextPackages may declare overrides.
|
static void |
releaseJAXBIntrospector(JAXBContext context,
JAXBIntrospector introspector)
Release JAXBIntrospector Do not call this method if an exception occurred while using the
JAXBIntrospector.
|
static void |
releaseJAXBMarshaller(JAXBContext context,
Marshaller marshaller)
releaseJAXBMarshalller
Do not call this method if an exception occurred while using the
Marshaller.
|
static void |
releaseJAXBUnmarshaller(JAXBContext context,
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 JAXBContext getJAXBContext(TreeSet<String> contextPackages) throws JAXBException
contextPackage - SetJAXBExceptionpublic static JAXBContext getJAXBContext(TreeSet<String> contextPackages, ClassLoader cacheKey) throws JAXBException
contextPackage - SetcacheKey - ClassLoaderJAXBExceptionpublic static JAXBContext getJAXBContext(TreeSet<String> contextPackages, Holder<JAXBUtils.CONSTRUCTION_TYPE> constructionType, String key) throws JAXBException
JAXBExceptionpublic static JAXBContext getJAXBContext(TreeSet<String> contextPackages, Holder<JAXBUtils.CONSTRUCTION_TYPE> constructionType, String key, ClassLoader cacheKey, Map<String,?> properties) throws JAXBException
contextPackage - SetcontructionType - (output value that indicates how the context was constructed)cacheKey - ClassLoaderJAXBExceptionpublic static JAXBContext getJAXBContext(TreeSet<String> contextPackages, Holder<JAXBUtils.CONSTRUCTION_TYPE> constructionType, boolean forceArrays, String key, ClassLoader cacheKey, Map<String,?> properties) throws JAXBException
contextPackage - SetcontructionType - (output value that indicates how the context was constructed)forceArrays - (forces the returned JAXBContext to include the array types)cacheKey - ClassLoaderJAXBExceptionprotected static List<String> pruneDirectives(TreeSet<String> contextPackages)
contextPackages - public static Unmarshaller getJAXBUnmarshaller(JAXBContext context) throws JAXBException
context - JAXBContextJAXBExceptionpublic static void releaseJAXBUnmarshaller(JAXBContext context, Unmarshaller unmarshaller)
context - JAXBContextunmarshaller - Unmarshallerpublic static Marshaller getJAXBMarshaller(JAXBContext context) throws JAXBException
context - JAXBContextJAXBExceptionpublic static void releaseJAXBMarshaller(JAXBContext context, Marshaller marshaller)
context - JAXBContextmarshaller - Marshallerpublic static JAXBIntrospector getJAXBIntrospector(JAXBContext context) throws JAXBException
context - JAXBContextJAXBExceptionpublic static void releaseJAXBIntrospector(JAXBContext context, JAXBIntrospector introspector)
context - JAXBContextintrospector - JAXBIntrospectorCopyright © 2004–2020 The Apache Software Foundation. All rights reserved.