org.springframework.oxm.jaxb
Class JaxbUtils
java.lang.Object
org.springframework.oxm.jaxb.JaxbUtils
public abstract class JaxbUtils
- extends java.lang.Object
Generic utility methods for working with JAXB. Mainly for internal use within the framework.
- Since:
- 1.0.0
- Author:
- Arjen Poutsma
|
Method Summary |
static XmlMappingException |
convertJaxbException(javax.xml.bind.JAXBException ex)
Converts the given JAXBException to an appropriate exception from the
org.springframework.oxm hierarchy. |
static int |
getJaxbVersion()
Gets the major JAXB version. |
static int |
getJaxbVersion(java.lang.ClassLoader classLoader)
Gets the major JAXB version. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JAXB_1
public static final int JAXB_1
- See Also:
- Constant Field Values
JAXB_2
public static final int JAXB_2
- See Also:
- Constant Field Values
JaxbUtils
public JaxbUtils()
getJaxbVersion
public static int getJaxbVersion()
- Gets the major JAXB version. This means we can do things like if
(getJaxbVersion() <= JAXB_2).
- Returns:
- a code comparable to the JAXP_XX codes in this class
- See Also:
JAXB_1,
JAXB_2
getJaxbVersion
public static int getJaxbVersion(java.lang.ClassLoader classLoader)
- Gets the major JAXB version. This means we can do things like if
(getJaxbVersion() <= JAXB_2).
- Returns:
- a code comparable to the JAXP_XX codes in this class
- See Also:
JAXB_1,
JAXB_2
convertJaxbException
public static XmlMappingException convertJaxbException(javax.xml.bind.JAXBException ex)
- Converts the given
JAXBException to an appropriate exception from the
org.springframework.oxm hierarchy.
- Parameters:
ex - JAXBException that occured
- Returns:
- the corresponding
XmlMappingException
Copyright © 2009. All Rights Reserved.