接口 Unmarshaller
- 所有已知子接口:
GenericUnmarshaller
,MimeUnmarshaller
- 所有已知实现类:
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.- 从以下版本开始:
- 3.0
- 作者:
- Arjen Poutsma
- 另请参阅:
Marshaller
方法详细资料
supports
boolean supports(Class<?> clazz)
Indicate whether this unmarshaller can unmarshal instances of the supplied type.- 参数:
clazz
- the class that this unmarshaller is being asked if it can marshal- 返回:
true
if this unmarshaller can indeed unmarshal to the supplied class;false
otherwise
unmarshal
Object unmarshal(Source source) throws IOException, XmlMappingException
Unmarshal the givenSource
into an object graph.- 参数:
source
- the source to marshal from- 返回:
- the object graph
- 抛出:
IOException
- if an I/O error occursXmlMappingException
- if the given source cannot be mapped to an object