java.lang.Object
org.eclipse.persistence.jaxb.JAXBMarshaller
- All Implemented Interfaces:
Marshaller
INTERNAL:
Purpose:To Provide an implementation of the JAXB 2.0 Marshaller Interface
Responsibilities:
- Provide a JAXB wrapper on the XMLMarshaller API
- Perform Object to XML Conversions
This implementation of the JAXB 2.1/2.2 Marshaller interface provides the required functionality by acting as a thin wrapper on the existing XMLMarshaller API.
- Since:
- Oracle TopLink 11.1.1.0.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface jakarta.xml.bind.Marshaller
Marshaller.Listener -
Field Summary
FieldsFields inherited from interface jakarta.xml.bind.Marshaller
JAXB_ENCODING, JAXB_FORMATTED_OUTPUT, JAXB_FRAGMENT, JAXB_NO_NAMESPACE_SCHEMA_LOCATION, JAXB_SCHEMA_LOCATION -
Constructor Summary
ConstructorsConstructorDescriptionJAXBMarshaller(XMLMarshaller newXMLMarshaller, JAXBContext jaxbContext) This constructor initializes various settings on the XML marshaller. -
Method Summary
Modifier and TypeMethodDescriptiongetAdapter(Class javaClass) Returns constraint violations stored in the underlyingJAXBBeanValidatorinstance.getProperty(String key) Get a property from the JAXBMarshaller.voidvoidmarshal(Object object, OutputStream outputStream) voidvoidmarshal(Object object, XMLEventWriter eventWriter) voidmarshal(Object object, XMLEventWriter eventWriter, TypeMappingInfo type) voidmarshal(Object object, XMLStreamWriter streamWriter) voidmarshal(Object object, XMLStreamWriter streamWriter, TypeMappingInfo type) voidvoidmarshal(Object object, Result result, TypeMappingInfo type) voidmarshal(Object object, MarshalRecord record) voidmarshal(Object object, MarshalRecord record, TypeMappingInfo type) voidvoidmarshal(Object object, ContentHandler contentHandler) voidsetAdapter(XmlAdapter adapter) voidsetAdapter(Class javaClass, XmlAdapter adapter) voidsetAttachmentMarshaller(AttachmentMarshaller attachmentMarshaller) voidsetEventHandler(ValidationEventHandler newValidationEventHandler) voidsetListener(Marshaller.Listener listener) voidsetMarshalCallbacks(Map callbacks) voidsetProperty(String key, Object value) Set a property on the JAXBMarshaller.void
-
Field Details
-
XML_JAVATYPE_ADAPTERS
- See Also:
-
-
Constructor Details
-
JAXBMarshaller
This constructor initializes various settings on the XML marshaller.- Parameters:
newXMLMarshaller- xml marshallerjaxbContext- jaxb context
-
-
Method Details
-
getAdapter
- Specified by:
getAdapterin interfaceMarshaller
-
getAttachmentMarshaller
- Specified by:
getAttachmentMarshallerin interfaceMarshaller
-
getEventHandler
- Specified by:
getEventHandlerin interfaceMarshaller- Throws:
JAXBException
-
getListener
- Specified by:
getListenerin interfaceMarshaller
-
getNode
- Specified by:
getNodein interfaceMarshaller- Throws:
JAXBException
-
getProperty
Get a property from the JAXBMarshaller. Attempting to get any unsupported property will result in a jakarta.xml.bind.PropertyException- Specified by:
getPropertyin interfaceMarshaller- Throws:
PropertyException- See Also:
-
getSchema
- Specified by:
getSchemain interfaceMarshaller
-
marshal
- Specified by:
marshalin interfaceMarshaller- Throws:
JAXBException
-
marshal
- Specified by:
marshalin interfaceMarshaller- Throws:
JAXBException
-
marshal
public void marshal(Object object, XMLEventWriter eventWriter, TypeMappingInfo type) throws JAXBException - Throws:
JAXBException
-
marshal
- Specified by:
marshalin interfaceMarshaller- Throws:
JAXBException
-
marshal
- Specified by:
marshalin interfaceMarshaller- Throws:
JAXBException
-
marshal
- Specified by:
marshalin interfaceMarshaller- Throws:
JAXBException
-
marshal
- Specified by:
marshalin interfaceMarshaller- Throws:
JAXBException
-
marshal
- Throws:
JAXBException
-
marshal
- Specified by:
marshalin interfaceMarshaller- Throws:
JAXBException
-
marshal
public void marshal(Object object, XMLStreamWriter streamWriter, TypeMappingInfo type) throws JAXBException - Throws:
JAXBException
-
marshal
- Specified by:
marshalin interfaceMarshaller- Throws:
JAXBException
-
marshal
- Throws:
JAXBException
-
marshal
- Throws:
JAXBException
-
setAdapter
- Specified by:
setAdapterin interfaceMarshaller
-
setAdapter
- Specified by:
setAdapterin interfaceMarshaller
-
setAttachmentMarshaller
- Specified by:
setAttachmentMarshallerin interfaceMarshaller
-
setEventHandler
- Specified by:
setEventHandlerin interfaceMarshaller- Throws:
JAXBException
-
setListener
- Specified by:
setListenerin interfaceMarshaller
-
setMarshalCallbacks
-
setProperty
Set a property on the JAXBMarshaller. Attempting to set any unsupported property will result in a jakarta.xml.bind.PropertyException- Specified by:
setPropertyin interfaceMarshaller- Throws:
PropertyException- See Also:
-
setSchema
- Specified by:
setSchemain interfaceMarshaller
-
getJaxbContext
-
getXMLMarshaller
-
getConstraintViolations
Returns constraint violations stored in the underlyingJAXBBeanValidatorinstance.- Returns:
- set of constraint violations from last unmarshal
-