Spring Web Services Framework

org.springframework.oxm.jaxb
Class JaxbUtils

java.lang.Object
  extended by org.springframework.oxm.jaxb.JaxbUtils

public abstract class JaxbUtils
extends Object

Generic utility methods for working with JAXB. Mainly for internal use within the framework.

Since:
1.0.0
Author:
Arjen Poutsma

Field Summary
static int JAXB_1
           
static int JAXB_2
           
 
Constructor Summary
JaxbUtils()
           
 
Method Summary
static XmlMappingException convertJaxbException(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(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
 

Field Detail

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
Constructor Detail

JaxbUtils

public JaxbUtils()
Method Detail

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(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(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

Spring Web Services Framework

Copyright © 2005-2010 The Spring Web Services Framework. All Rights Reserved.