Package org.springframework.oxm
Interface Unmarshaller
- All Known Subinterfaces:
GenericUnmarshaller,MimeUnmarshaller
- All Known Implementing Classes:
AbstractMarshaller,CastorMarshaller,Jaxb2Marshaller,JibxMarshaller,XmlBeansMarshaller,XStreamMarshaller
public interface Unmarshaller
Defines the contract for Object XML Mapping unmarshallers. Implementations of this interface can deserialize a given XML Stream to an Object graph.- Since:
- 3.0
- Author:
- Arjen Poutsma
- See Also:
Marshaller
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleansupports(Class<?> clazz)Indicate whether this unmarshaller can unmarshal instances of the supplied type.Objectunmarshal(Source source)Unmarshal the givenSourceinto an object graph.
Method Detail
supports
boolean supports(Class<?> clazz)
Indicate whether this unmarshaller can unmarshal instances of the supplied type.- Parameters:
clazz- the class that this unmarshaller is being asked if it can marshal- Returns:
trueif this unmarshaller can indeed unmarshal to the supplied class;falseotherwise
unmarshal
Object unmarshal(Source source) throws IOException, XmlMappingException
Unmarshal the givenSourceinto an object graph.- Parameters:
source- the source to marshal from- Returns:
- the object graph
- Throws:
IOException- if an I/O error occursXmlMappingException- if the given source cannot be mapped to an object