- All Implemented Interfaces:
- com.thoughtworks.xstream.converters.Converter, com.thoughtworks.xstream.converters.ConverterMatcher
public class ExtendableBeanConverter
extends Object
implements com.thoughtworks.xstream.converters.Converter
Serializes an ExtendableBeanImpl type as a Map instead of a POJO.
Note: For an ExtendableBean field within a POJO to be properly serialized to
XML, the field must still be hardcoded into the POJO, even if the POJO itself
is an ExtendableBean. This is because POJOs are still serialized to XML
normally to preserve custom formatting (hence why this class ONLY converts
ExtendableBeanImpl). If xstream does not expect the ExtendableBean field, it
will not serialize it. This does not, however, affect JSON serialization,
which always works without predefining the field when extending
ExtendableBean.