|
EclipseLink 2.3.2, build 'v20111125-r10461' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.persistence.jaxb.JAXBHelper
public class JAXBHelper
This class provides a mechanism to obtain the EclipseLink implementation of various JAXB runtime classes based on a given JAXB class/interface. This is useful for accessing extended EclipseLink features. Using this helper class will alleviate the need for consumers of EclipseLink JAXB to perform casts where their code makes use of the standard JAXB API. In addition, a given JAXB class/interface can be unwrapped based on a user-specified class. This will allow access - in certain cases - to a given JAXB implementation class' underlying class(es). For example, a Marshaller could be unwrapped resulting in an EclipseLink JAXBMarshaller, or its underlying XMLMarshaller.
Constructor Summary | |
---|---|
JAXBHelper()
|
Method Summary | ||
---|---|---|
static JAXBBinder |
getBinder(Binder jaxbBinder)
Return the EclipseLink implementation of Binder. |
|
static JAXBContext |
getJAXBContext(JAXBContext jaxbContext)
Return the EclipseLink implementation of JAXBContext. |
|
static JAXBMarshaller |
getMarshaller(Marshaller jaxbMarshaller)
Return the EclipseLink implementation of Marshaller. |
|
static JAXBUnmarshaller |
getUnmarshaller(Unmarshaller jaxbUnmarshaller)
Return the EclipseLink implementation of Unmarshaller. |
|
static
|
unwrap(Binder jaxbBinder,
java.lang.Class<T> clazz)
Unwraps a given Binder resulting in an EclipseLink JAXBBinder, or the EclipseLink JAXBBinder's underlying XMLBinder. |
|
static
|
unwrap(JAXBContext jaxbContext,
java.lang.Class<T> clazz)
Unwraps a given JAXBContext resulting in an EclipseLink JAXBContext, or the EclipseLink JAXBContext's underlying XMLContext. |
|
static
|
unwrap(Marshaller jaxbMarshaller,
java.lang.Class<T> clazz)
Unwraps a given Marshaller resulting in an EclipseLink JAXBMarshaller, or the EclipseLink JAXBMarshaller's underlying XMLMarshaller. |
|
static
|
unwrap(Unmarshaller jaxbUnmarshaller,
java.lang.Class<T> clazz)
Unwraps a given Unmarshaller resulting in an EclipseLink JAXBUnmarshaller, or the EclipseLink JAXBUnmarshaller's underlying XMLUnmarshaller. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JAXBHelper()
Method Detail |
---|
public static JAXBContext getJAXBContext(JAXBContext jaxbContext) throws java.lang.IllegalArgumentException
JAXBContext
. If not, an exception will be
thrown.
jaxbContext
-
java.lang.IllegalArgumentException
public static JAXBUnmarshaller getUnmarshaller(Unmarshaller jaxbUnmarshaller) throws java.lang.IllegalArgumentException
JAXBUnmarshaller
. If not, an exception
will be thrown.
jaxbUnmarshaller
-
java.lang.IllegalArgumentException
public static JAXBMarshaller getMarshaller(Marshaller jaxbMarshaller) throws java.lang.IllegalArgumentException
JAXBMarshaller
. If not, an exception will be
thrown.
jaxbMarshaller
-
java.lang.IllegalArgumentException
public static JAXBBinder getBinder(Binder jaxbBinder) throws java.lang.IllegalArgumentException
JAXBBinder
. If not, an exception will be
thrown.
jaxbBinder
-
java.lang.IllegalArgumentException
public static <T> T unwrap(JAXBContext jaxbContext, java.lang.Class<T> clazz) throws java.lang.IllegalArgumentException
T
- jaxbContext
- clazz
-
java.lang.IllegalArgumentException
JAXBContext
,
XMLContext
public static <T> T unwrap(Unmarshaller jaxbUnmarshaller, java.lang.Class<T> clazz) throws java.lang.IllegalArgumentException
T
- jaxbUnmarshaller
- clazz
-
java.lang.IllegalArgumentException
JAXBUnmarshaller
,
XMLUnmarshaller
public static <T> T unwrap(Marshaller jaxbMarshaller, java.lang.Class<T> clazz) throws java.lang.IllegalArgumentException
T
- jaxbMarshaller
- clazz
-
java.lang.IllegalArgumentException
JAXBMarshaller
,
XMLMarshaller
public static <T> T unwrap(Binder jaxbBinder, java.lang.Class<T> clazz) throws java.lang.IllegalArgumentException
T
- jaxbBinder
- clazz
-
java.lang.IllegalArgumentException
JAXBBinder
,
XMLBinder
|
EclipseLink 2.3.2, build 'v20111125-r10461' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |