public class XStreamDomConverter extends Object implements DomConverter
| Constructor and Description |
|---|
XStreamDomConverter(Class<?> valueType) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
configureXStream(com.thoughtworks.xstream.XStream xStream) |
Object |
convertDomToValue(DomElement parentElement,
Object value)
Converts a DOM to a (complex) value of the type returned by
DomConverter.getValueType(). |
void |
convertValueToDom(Object value,
DomElement parentElement)
Converts a (complex) value of the type returned by
DomConverter.getValueType() to its
DOM representation which may be further converted to XML. |
Class<?> |
getValueType()
Gets the value type, which may be abstract.
|
com.thoughtworks.xstream.XStream |
getXStream() |
public XStreamDomConverter(Class<?> valueType)
public Class<?> getValueType()
DomConvertergetValueType in interface DomConverterpublic Object convertDomToValue(DomElement parentElement, Object value) throws ConversionException, ValidationException
DomConverterDomConverter.getValueType().convertDomToValue in interface DomConverterparentElement - The parent DOM element.value - The value which receives the DOM representation of the value or null.
If value is null, the method is responsible for the creation of a new instance
and its configuration using the DOM.null.ConversionException - If the conversion fails.ValidationException - If the converted value is invalid.public void convertValueToDom(Object value, DomElement parentElement) throws ConversionException
DomConverterDomConverter.getValueType() to its
DOM representation which may be further converted to XML. The given value can be
safely cast to the type returned by DomConverter.getValueType().convertValueToDom in interface DomConvertervalue - The value to be converted to the DOM. Never null.parentElement - The parent DOM element, which receives the DOM representation of the value.ConversionException - If the conversion fails (e.g. not implemented).public com.thoughtworks.xstream.XStream getXStream()
protected void configureXStream(com.thoughtworks.xstream.XStream xStream)
Copyright © 2014–2017 European Space Agency (ESA). All rights reserved.