类 MarshallingSource
- java.lang.Object
- javax.xml.transform.sax.SAXSource
- org.springframework.oxm.support.MarshallingSource
- 所有已实现的接口:
Source
public class MarshallingSource extends SAXSource
Source
implementation that uses aMarshaller
.Can be constructed with aMarshaller
and an object to be marshalled.Even though
MarshallingSource
extends fromSAXSource
, calling the methods ofSAXSource
is not supported. In general, the only supported operation on this class is to use theXMLReader
obtained viaSAXSource.getXMLReader()
to parse the input source obtained viaSAXSource.getInputSource()
. CallingsetXMLReader(XMLReader)
orsetInputSource(InputSource)
will result inUnsupportedOperationException
s.- 从以下版本开始:
- 3.0
- 作者:
- Arjen Poutsma
- 另请参阅:
Transformer
构造器概要
构造器 构造器 说明 MarshallingSource(Marshaller marshaller, Object content)
Create a newMarshallingSource
with the given marshaller and content.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 Object
getContent()
Return the object to be marshalled.Marshaller
getMarshaller()
Return theMarshaller
used by thisMarshallingSource
.void
setInputSource(InputSource inputSource)
Throws aUnsupportedOperationException
.void
setXMLReader(XMLReader reader)
Throws aUnsupportedOperationException
.从类继承的方法 javax.xml.transform.sax.SAXSource
getInputSource, getSystemId, getXMLReader, isEmpty, setSystemId, sourceToInputSource
构造器详细资料
MarshallingSource
public MarshallingSource(Marshaller marshaller, Object content)
Create a newMarshallingSource
with the given marshaller and content.- 参数:
marshaller
- the marshaller to usecontent
- the object to be marshalled
方法详细资料
getMarshaller
public Marshaller getMarshaller()
Return theMarshaller
used by thisMarshallingSource
.
getContent
public Object getContent()
Return the object to be marshalled.
setInputSource
public void setInputSource(InputSource inputSource)
Throws aUnsupportedOperationException
.- 覆盖:
setInputSource
在类中SAXSource
setXMLReader
public void setXMLReader(XMLReader reader)
Throws aUnsupportedOperationException
.- 覆盖:
setXMLReader
在类中SAXSource