类 MarshallingSource
- java.lang.Object
- javax.xml.transform.sax.SAXSource
- org.springframework.oxm.support.MarshallingSource
- 所有已实现的接口:
Source
public class MarshallingSource extends SAXSource
Sourceimplementation that uses aMarshaller.Can be constructed with aMarshallerand an object to be marshalled.Even though
MarshallingSourceextends fromSAXSource, calling the methods ofSAXSourceis not supported. In general, the only supported operation on this class is to use theXMLReaderobtained viaSAXSource.getXMLReader()to parse the input source obtained viaSAXSource.getInputSource(). CallingsetXMLReader(XMLReader)orsetInputSource(InputSource)will result inUnsupportedOperationExceptions.- 从以下版本开始:
- 3.0
- 作者:
- Arjen Poutsma
- 另请参阅:
Transformer
构造器概要
构造器 构造器 说明 MarshallingSource(Marshaller marshaller, Object content)Create a newMarshallingSourcewith the given marshaller and content.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 ObjectgetContent()Return the object to be marshalled.MarshallergetMarshaller()Return theMarshallerused by thisMarshallingSource.voidsetInputSource(InputSource inputSource)Throws aUnsupportedOperationException.voidsetXMLReader(XMLReader reader)Throws aUnsupportedOperationException.从类继承的方法 javax.xml.transform.sax.SAXSource
getInputSource, getSystemId, getXMLReader, isEmpty, setSystemId, sourceToInputSource
构造器详细资料
MarshallingSource
public MarshallingSource(Marshaller marshaller, Object content)
Create a newMarshallingSourcewith the given marshaller and content.- 参数:
marshaller- the marshaller to usecontent- the object to be marshalled
方法详细资料
getMarshaller
public Marshaller getMarshaller()
Return theMarshallerused 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