org.apache.axis2.jaxws.message.databinding
Class JAXBContextFromClasses

java.lang.Object
  extended by org.apache.axis2.jaxws.message.databinding.JAXBContextFromClasses

public class JAXBContextFromClasses
extends java.lang.Object

This class provides a utility method, newInstance, which builds a valid JAXBContext from a series of classes.


Method Summary
static javax.xml.bind.JAXBContext newInstance(java.lang.Class[] classArray, java.lang.ClassLoader cl, java.util.Map<java.lang.String,?> properties)
          Create a JAXBContext from the given class array and class loader.
static javax.xml.bind.JAXBContext newInstance(java.lang.Class[] classArray, java.lang.ClassLoader cl, java.util.Map<java.lang.String,?> properties, java.util.List<java.lang.String> classRefs)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newInstance

public static javax.xml.bind.JAXBContext newInstance(java.lang.Class[] classArray,
                                                     java.lang.ClassLoader cl,
                                                     java.util.Map<java.lang.String,?> properties)
                                              throws javax.xml.bind.JAXBException
Create a JAXBContext from the given class array and class loader. If errors occur, then the JAXBContext is created from the minimal set of valid classes. Note: Sometimes users will intermingle JAXB classes and other non-JAXB utility classes. This is not a good practice, but does happen. The purpose of this method is to try and build a valid JAXBContext from only the 'valid' classes.

Parameters:
classArray -
cl -
properties -
classRefs - optional List of class references
Returns:
JAXBContext
Throws:
javax.xml.bind.JAXBException

newInstance

public static javax.xml.bind.JAXBContext newInstance(java.lang.Class[] classArray,
                                                     java.lang.ClassLoader cl,
                                                     java.util.Map<java.lang.String,?> properties,
                                                     java.util.List<java.lang.String> classRefs)
                                              throws javax.xml.bind.JAXBException
Throws:
javax.xml.bind.JAXBException


Copyright © 2004-2011 The Apache Software Foundation. All Rights Reserved.