Class JAXBContextFromClasses
java.lang.Object
org.apache.axis2.jaxws.message.databinding.JAXBContextFromClasses
This class provides a utility method, newInstance, which
builds a valid JAXBContext from a series of classes.
-
Method Summary
Modifier and TypeMethodDescriptionstatic jakarta.xml.bind.JAXBContextnewInstance(Class[] classArray, ClassLoader cl, Map<String, ?> properties) Create a JAXBContext from the given class array and class loader.static jakarta.xml.bind.JAXBContextnewInstance(Class[] classArray, ClassLoader cl, Map<String, ?> properties, List<String> classRefs)
-
Method Details
-
newInstance
public static jakarta.xml.bind.JAXBContext newInstance(Class[] classArray, ClassLoader cl, Map<String, ?> properties) throws jakarta.xml.bind.JAXBExceptionCreate 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 Listof class references - Returns:
- JAXBContext
- Throws:
jakarta.xml.bind.JAXBException
-
newInstance
public static jakarta.xml.bind.JAXBContext newInstance(Class[] classArray, ClassLoader cl, Map<String, ?> properties, List<String> classRefs) throws jakarta.xml.bind.JAXBException- Throws:
jakarta.xml.bind.JAXBException
-