Marshaller interface for the JAXB RI.
Eventually all the marshal methods call into
the write method.
| Modifier and Type | Field and Description |
|---|---|
| protected static final String | |
| private boolean | c14nSupport
Configured for c14n? |
| pack-priv final JAXBContextImpl | context
reference to the context that created this object |
| protected static final String | |
| protected static final String | |
| private CharacterEscapeHandler | escapeHandler
Object that handles character escaping. |
| private Marshaller. | externalListener
Marshaller.Listener |
| private String | header
XML BLOB written after the XML declaration. |
| private String | indent
Indentation string. |
| protected static final String | |
| private static final Logger | |
| protected static final String | |
| protected static final String | |
| private NamespacePrefixMapper | prefixMapper
Used to assign prefixes to namespace URIs. |
| private Schema | schema
Non-null if we do the marshal-time validation. |
| protected final XMLSerializer | |
| private Closeable | |
| private Flushable | |
| protected static final String | |
| protected static final String |
| Access | Constructor and Description |
|---|---|
| public | MarshallerImpl(JAXBContextImpl c, AssociationMap<XmlNode>
non-null if the marshaller is working inside assoc)BinderImpl.
|
| Modifier and Type | Method and Description |
|---|---|
| private void | checkBoolean(String name, Object value)
Hides jakarta.
|
| private void | checkString(String name, Object value)
Hides jakarta.
|
| private void | |
| protected CharacterEscapeHandler | |
| pack-priv Runnable | |
| public XmlOutput | |
| public XmlOutput | |
| public XmlOutput | |
| public XmlOutput | |
| pack-priv XmlOutput | |
| public <A extends XmlAdapter | getAdapter(Class<A> type)
Overrides jakarta. Implements jakarta. Gets the adapter associated with the specified type. |
| public AttachmentMarshaller | |
| public JAXBContextImpl | |
| pack-priv CharacterEscapeHandler | Returns: escape handlerReturns escape handler provided with JAXB context parameters. |
| public Marshaller. | getListener()
Overrides jakarta. Implements jakarta. Return |
| public Object | getProperty(String name)
Overrides jakarta. Implements jakarta. Default implementation of the getProperty method handles the four defined properties in Marshaller. |
| public Schema | getSchema()
Overrides jakarta. Implements jakarta. Get the JAXP |
| public boolean | handleEvent(ValidationEvent event)
Implements jakarta. Default error handling behavior fot |
| public void | marshal(Object obj, OutputStream out, NamespaceContext inscopeNamespace)
Marshals to |
| public void | marshal(Object obj, XMLStreamWriter writer)
Overrides jakarta. Implements jakarta. Marshal the content tree rooted at |
| public void | marshal(Object obj, XMLEventWriter writer)
Overrides jakarta. Implements jakarta. Marshal the content tree rooted at |
| public void | |
| public void | marshal(Object target, Result result)
Implements jakarta. Marshal the content tree rooted at |
| private void | |
| private void | |
| public <A extends XmlAdapter | setAdapter(Class<A> type, A adapter)
Overrides jakarta. Implements jakarta. Associates a configured instance of |
| public void | setAttachmentMarshaller(AttachmentMarshaller am)
Overrides jakarta. Implements jakarta. Associate a context that enables binary data within an XML document to be transmitted as XML-binary optimized attachment. |
| public void | setListener(Marshaller.
Overrides jakarta. Implements jakarta.
Register marshal event callback |
| public void | setProperty(String name, Object value)
Overrides jakarta. Implements jakarta. Default implementation of the setProperty method handles the four defined properties in Marshaller. |
| public void | setSchema(Schema s)
Overrides jakarta. Implements jakarta. Specify the JAXP |
| protected <T> void | write(Name rootTagName, JaxBeanInfo<T> bi, T obj, XmlOutput out, Runnable postInitAction)
Used by |
| private void |
| C14N | back to summary |
|---|---|
| protected static final String C14N | |
| c14nSupport | back to summary |
|---|---|
| private boolean c14nSupport Configured for c14n? | |
| context | back to summary |
|---|---|
| pack-priv final JAXBContextImpl context reference to the context that created this object | |
| ENCODING_HANDLER | back to summary |
|---|---|
| protected static final String ENCODING_HANDLER | |
| ENCODING_HANDLER2 | back to summary |
|---|---|
| protected static final String ENCODING_HANDLER2 | |
| escapeHandler | back to summary |
|---|---|
| private CharacterEscapeHandler escapeHandler Object that handles character escaping. | |
| externalListener | back to summary |
|---|---|
| private Marshaller. Marshaller.Listener | |
| header | back to summary |
|---|---|
| private String header XML BLOB written after the XML declaration. | |
| indent | back to summary |
|---|---|
| private String indent Indentation string. Default is four whitespaces. | |
| INDENT_STRING | back to summary |
|---|---|
| protected static final String INDENT_STRING | |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| OBJECT_IDENTITY_CYCLE_DETECTION | back to summary |
|---|---|
| protected static final String OBJECT_IDENTITY_CYCLE_DETECTION | |
| PREFIX_MAPPER | back to summary |
|---|---|
| protected static final String PREFIX_MAPPER | |
| prefixMapper | back to summary |
|---|---|
| private NamespacePrefixMapper prefixMapper Used to assign prefixes to namespace URIs. | |
| schema | back to summary |
|---|---|
| private Schema schema Non-null if we do the marshal-time validation. | |
| serializer | back to summary |
|---|---|
| protected final XMLSerializer serializer | |
| toBeClosed | back to summary |
|---|---|
| private Closeable toBeClosed | |
| toBeFlushed | back to summary |
|---|---|
| private Flushable toBeFlushed | |
| XML_HEADERS | back to summary |
|---|---|
| protected static final String XML_HEADERS | |
| XMLDECLARATION | back to summary |
|---|---|
| protected static final String XMLDECLARATION | |
| MarshallerImpl | back to summary |
|---|---|
public MarshallerImpl(JAXBContextImpl c, AssociationMap<XmlNode> assoc)
| |
| checkBoolean | back to summary |
|---|---|
| private void checkBoolean(String name, Object value) throws PropertyException Hides jakarta. | |
| checkString | back to summary |
|---|---|
| private void checkString(String name, Object value) throws PropertyException Hides jakarta. | |
| cleanUp | back to summary |
|---|---|
| private void cleanUp() | |
| createEscapeHandler | back to summary |
|---|---|
| protected CharacterEscapeHandler createEscapeHandler(String encoding) | |
| createPostInitAction | back to summary |
|---|---|
| pack-priv Runnable createPostInitAction(Result result) Creates an appropriate post-init action object. | |
| createWriter | back to summary |
|---|---|
| public XmlOutput createWriter(Writer w, String encoding) | |
| createWriter | back to summary |
|---|---|
| public XmlOutput createWriter(Writer w) | |
| createWriter | back to summary |
|---|---|
| public XmlOutput createWriter(OutputStream os) throws JAXBException | |
| createWriter | back to summary |
|---|---|
| public XmlOutput createWriter(OutputStream os, String encoding) throws JAXBException | |
| createXmlOutput | back to summary |
|---|---|
| pack-priv XmlOutput createXmlOutput(Result result) throws JAXBException | |
| getAdapter | back to summary |
|---|---|
| public <A extends XmlAdapter Overrides jakarta. Implements jakarta. Doc from jakarta. Gets the adapter associated with the specified type.
This is the reverse operation of the
| |
| getAttachmentMarshaller | back to summary |
|---|---|
| public AttachmentMarshaller getAttachmentMarshaller() Overrides jakarta. Implements jakarta.
| |
| getContext | back to summary |
|---|---|
| public JAXBContextImpl getContext() | |
| getEscapeHandler | back to summary |
|---|---|
| pack-priv CharacterEscapeHandler getEscapeHandler() Returns escape handler provided with JAXB context parameters.
| |
| getListener | back to summary |
|---|---|
| public Marshaller. Overrides jakarta. Implements jakarta. Doc from jakarta. Return
| |
| getProperty | back to summary |
|---|---|
| public Object getProperty(String name) throws PropertyException Overrides jakarta. Implements jakarta. Doc from jakarta. Default implementation of the getProperty method handles the four defined properties in Marshaller. If a provider needs to support additional provider specific properties, it should override this method in a derived class.
| |
| getSchema | back to summary |
|---|---|
| public Schema getSchema() Overrides jakarta. Implements jakarta. Doc from jakarta. Get the JAXP
| |
| handleEvent | back to summary |
|---|---|
| public boolean handleEvent(ValidationEvent event) Implements jakarta. Default error handling behavior fot
| |
| marshal | back to summary |
|---|---|
| public void marshal(Object obj, OutputStream out, NamespaceContext inscopeNamespace) throws JAXBException Marshals to
| |
| marshal | back to summary |
|---|---|
| public void marshal(Object obj, XMLStreamWriter writer) throws JAXBException Overrides jakarta. Implements jakarta. Doc from jakarta. Marshal the content tree rooted at
| |
| marshal | back to summary |
|---|---|
| public void marshal(Object obj, XMLEventWriter writer) throws JAXBException Overrides jakarta. Implements jakarta. Doc from jakarta. Marshal the content tree rooted at
| |
| marshal | back to summary |
|---|---|
| public void marshal(Object obj, XmlOutput output) throws JAXBException | |
| marshal | back to summary |
|---|---|
| public void marshal(Object target, Result result) throws JAXBException Implements jakarta. Doc from jakarta. Marshal the content tree rooted at
All Jakarta XML Binding Providers must at least support
| |
| postwrite | back to summary |
|---|---|
| private void postwrite() throws IOException, SAXException, XMLStreamException | |
| prewrite | back to summary |
|---|---|
| private void prewrite(XmlOutput out, boolean fragment, Runnable postInitAction) throws IOException, SAXException, XMLStreamException | |
| setAdapter | back to summary |
|---|---|
| public <A extends XmlAdapter Overrides jakarta. Implements jakarta. Doc from jakarta. Associates a configured instance of
Every marshaller internally maintains a
This method allows applications to use a configured instance of
| |
| setAttachmentMarshaller | back to summary |
|---|---|
| public void setAttachmentMarshaller(AttachmentMarshaller am) Overrides jakarta. Implements jakarta. Doc from jakarta. Associate a context that enables binary data within an XML document to be transmitted as XML-binary optimized attachment. The attachment is referenced from the XML document content model by content-id URIs(cid) references stored within the xml document.
| |
| setListener | back to summary |
|---|---|
| public void setListener(Marshaller. Overrides jakarta. Implements jakarta. Doc from jakarta.
Register marshal event callback
There is only one Listener per Marshaller. Setting a Listener replaces the previous set Listener.
One can unregister current Listener by setting listener to
| |
| setProperty | back to summary |
|---|---|
| public void setProperty(String name, Object value) throws PropertyException Overrides jakarta. Implements jakarta. Doc from jakarta. Default implementation of the setProperty method handles the four defined properties in Marshaller. If a provider needs to handle additional properties, it should override this method in a derived class.
| |
| setSchema | back to summary |
|---|---|
| public void setSchema(Schema s) Overrides jakarta. Implements jakarta. Doc from jakarta. Specify the JAXP This method allows the caller to validate the marshalled XML as it's marshalled.
Initially this property is set to
| |
| write | back to summary |
|---|---|
| protected <T> void write(Name rootTagName, JaxBeanInfo<T> bi, T obj, XmlOutput out, Runnable postInitAction) throws JAXBException Used by | |
| write | back to summary |
|---|---|
| private void write(Object obj, XmlOutput out, Runnable postInitAction) throws JAXBException All the marshal method invocation eventually comes down to this call. | |