Top Description Methods
org.springframework.oxm

public Interface Marshaller

Known Direct Subinterfaces
org.springframework.oxm.mime.MimeMarshaller, org.springframework.oxm.GenericMarshaller
Known Direct Implementers
org.springframework.oxm.support.AbstractMarshaller
Imports
java.io.IOException, javax.xml.transform.Result

Defines the contract for Object XML Mapping Marshallers. Implementations of this interface can serialize a given Object to an XML Stream.

Although the marshal method accepts a java.lang.Object as its first parameter, most Marshaller implementations cannot handle arbitrary Objects. Instead, an object class must be registered with the marshaller, or have a common base class.

Author
Arjen Poutsma
Since
3.0
See Also
Unmarshaller

Method Summary

Modifier and TypeMethod and Description
public void
marshal(Object
the root of the object graph to marshal
graph
,
Result
the result to marshal to
result
)

Marshal the object graph with the given root into the provided Result.

public boolean

Returns:

true if this marshaller can indeed marshal instances of the supplied class; false otherwise
supports
(Class<?>
the class that this marshaller is being asked if it can marshal
clazz
)

Indicate whether this marshaller can marshal instances of the supplied type.

Method Detail

marshalback to summary
public void marshal(Object graph, Result result) throws IOException, XmlMappingException

Marshal the object graph with the given root into the provided Result.

Parameters
graph:Object

the root of the object graph to marshal

result:Result

the result to marshal to

Exceptions
IOException:
if an I/O error occurs
XmlMappingException:
if the given object cannot be marshalled to the result
supportsback to summary
public boolean supports(Class<?> clazz)

Indicate whether this marshaller can marshal instances of the supplied type.

Parameters
clazz:Class<?>

the class that this marshaller is being asked if it can marshal

Returns:boolean

true if this marshaller can indeed marshal instances of the supplied class; false otherwise