public class JAXBMarshaller extends Object implements Marshaller
Purpose:To Provide an implementation of the JAXB 2.0 Marshaller Interface
Responsibilities:
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.
Marshaller,
MarshallerProperties,
XMLMarshallerMarshaller.Listener| Modifier and Type | Field and Description |
|---|---|
static String |
XML_JAVATYPE_ADAPTERS |
JAXB_ENCODING, JAXB_FORMATTED_OUTPUT, JAXB_FRAGMENT, JAXB_NO_NAMESPACE_SCHEMA_LOCATION, JAXB_SCHEMA_LOCATION| Constructor and Description |
|---|
JAXBMarshaller(XMLMarshaller newXMLMarshaller,
JAXBContext jaxbContext)
This constructor initializes various settings on the XML marshaller.
|
public static final String XML_JAVATYPE_ADAPTERS
public JAXBMarshaller(XMLMarshaller newXMLMarshaller, JAXBContext jaxbContext)
newXMLMarshaller - xml marshallerjaxbContext - jaxb contextpublic XmlAdapter getAdapter(Class javaClass)
getAdapter in interface Marshallerpublic AttachmentMarshaller getAttachmentMarshaller()
getAttachmentMarshaller in interface Marshallerpublic ValidationEventHandler getEventHandler() throws JAXBException
getEventHandler in interface MarshallerJAXBExceptionpublic Marshaller.Listener getListener()
getListener in interface Marshallerpublic Node getNode(Object object) throws JAXBException
getNode in interface MarshallerJAXBExceptionpublic Object getProperty(String key) throws PropertyException
getProperty in interface MarshallerPropertyExceptionMarshallerPropertiespublic Schema getSchema()
getSchema in interface Marshallerpublic void marshal(Object object, ContentHandler contentHandler) throws JAXBException
marshal in interface MarshallerJAXBExceptionpublic void marshal(Object object, XMLEventWriter eventWriter) throws JAXBException
marshal in interface MarshallerJAXBExceptionpublic void marshal(Object object, XMLEventWriter eventWriter, TypeMappingInfo type) throws JAXBException
JAXBExceptionpublic void marshal(Object object, Node node) throws JAXBException
marshal in interface MarshallerJAXBExceptionpublic void marshal(Object object, OutputStream outputStream) throws JAXBException
marshal in interface MarshallerJAXBExceptionpublic void marshal(Object object, File file) throws JAXBException
marshal in interface MarshallerJAXBExceptionpublic void marshal(Object object, Result result) throws JAXBException
marshal in interface MarshallerJAXBExceptionpublic void marshal(Object object, Result result, TypeMappingInfo type) throws JAXBException
JAXBExceptionpublic void marshal(Object object, XMLStreamWriter streamWriter) throws JAXBException
marshal in interface MarshallerJAXBExceptionpublic void marshal(Object object, XMLStreamWriter streamWriter, TypeMappingInfo type) throws JAXBException
JAXBExceptionpublic void marshal(Object object, Writer writer) throws JAXBException
marshal in interface MarshallerJAXBExceptionpublic void marshal(Object object, MarshalRecord record) throws JAXBException
JAXBExceptionpublic void marshal(Object object, MarshalRecord record, TypeMappingInfo type) throws JAXBException
JAXBExceptionpublic void setAdapter(Class javaClass, XmlAdapter adapter)
setAdapter in interface Marshallerpublic void setAdapter(XmlAdapter adapter)
setAdapter in interface Marshallerpublic void setAttachmentMarshaller(AttachmentMarshaller attachmentMarshaller)
setAttachmentMarshaller in interface Marshallerpublic void setEventHandler(ValidationEventHandler newValidationEventHandler) throws JAXBException
setEventHandler in interface MarshallerJAXBExceptionpublic void setListener(Marshaller.Listener listener)
setListener in interface Marshallerpublic void setMarshalCallbacks(Map callbacks)
public void setProperty(String key, Object value) throws PropertyException
setProperty in interface MarshallerPropertyExceptionMarshallerPropertiespublic void setSchema(Schema schema)
setSchema in interface Marshallerpublic JAXBContext getJaxbContext()
public XMLMarshaller getXMLMarshaller()
public Set<ConstraintViolationWrapper<Object>> getConstraintViolations()
JAXBBeanValidator instance.EclipseLink 2.6.3, "build v20160428-59c81c5" API Reference