Package org.apache.axiom.om.util.jaxb
Class JAXBUtils
java.lang.Object
org.apache.axiom.om.util.jaxb.JAXBUtils
Contains utility methods that integrate JAXB with Axiom.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Objectunmarshal(jakarta.xml.bind.JAXBContext context, org.apache.axiom.om.OMElement element, boolean cache) Deprecated.static Objectunmarshal(org.apache.axiom.om.OMContainer container, jakarta.xml.bind.JAXBContext context, UnmarshallerConfigurator configurator, boolean preserve) Unmarshall the information item using JAXB.static <T> jakarta.xml.bind.JAXBElement<T>unmarshal(org.apache.axiom.om.OMContainer container, jakarta.xml.bind.JAXBContext context, UnmarshallerConfigurator configurator, Class<T> declaredType, boolean preserve) Unmarshall the information item using JAXB.
-
Method Details
-
unmarshal
public static Object unmarshal(jakarta.xml.bind.JAXBContext context, org.apache.axiom.om.OMElement element, boolean cache) throws jakarta.xml.bind.JAXBException Deprecated.- Throws:
jakarta.xml.bind.JAXBException
-
unmarshal
public static Object unmarshal(org.apache.axiom.om.OMContainer container, jakarta.xml.bind.JAXBContext context, UnmarshallerConfigurator configurator, boolean preserve) throws jakarta.xml.bind.JAXBException Unmarshall the information item using JAXB.- Parameters:
container- the document or element to unmarshallcontext- the JAXB contextconfigurator- custom unmarshaller settings to apply; may benullpreserve- specifies whether the content of the information item should be preserved- Returns:
- the unmarshalled object
- Throws:
jakarta.xml.bind.JAXBException- if an error occurred while unmarshalling
-
unmarshal
public static <T> jakarta.xml.bind.JAXBElement<T> unmarshal(org.apache.axiom.om.OMContainer container, jakarta.xml.bind.JAXBContext context, UnmarshallerConfigurator configurator, Class<T> declaredType, boolean preserve) throws jakarta.xml.bind.JAXBException Unmarshall the information item using JAXB.- Parameters:
container- the document or element to unmarshallcontext- the JAXB contextconfigurator- custom unmarshaller settings to apply; may benulldeclaredType- a JAXB mapped class to hold the XML data.preserve- specifies whether the content of the information item should be preserved- Returns:
- the unmarshalled object
- Throws:
jakarta.xml.bind.JAXBException- if an error occurred while unmarshalling
-
unmarshal(OMContainer, JAXBContext, UnmarshallerConfigurator, boolean)instead.