public abstract static class XStream2.PassthruConverter<T> extends Object implements com.thoughtworks.xstream.converters.Converter
ConverterImpl
subclass that extends this class to run some
callback code just after a type is unmarshalled by RobustReflectionConverter.
Example: public static class ConverterImpl extends XStream2.PassthruConverter<MyType> { public ConverterImpl(XStream2 xstream) { super(xstream); } @Override protected void callback(MyType obj, UnmarshallingContext context) { ...
Constructor and Description |
---|
PassthruConverter(XStream2 xstream) |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
callback(T obj,
com.thoughtworks.xstream.converters.UnmarshallingContext context) |
boolean |
canConvert(Class type) |
void |
marshal(Object source,
com.thoughtworks.xstream.io.HierarchicalStreamWriter writer,
com.thoughtworks.xstream.converters.MarshallingContext context) |
Object |
unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader reader,
com.thoughtworks.xstream.converters.UnmarshallingContext context) |
public PassthruConverter(XStream2 xstream)
public boolean canConvert(Class type)
canConvert
in interface com.thoughtworks.xstream.converters.ConverterMatcher
public void marshal(Object source, com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context)
marshal
in interface com.thoughtworks.xstream.converters.Converter
public Object unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context)
unmarshal
in interface com.thoughtworks.xstream.converters.Converter
protected abstract void callback(T obj, com.thoughtworks.xstream.converters.UnmarshallingContext context)
Copyright © 2019. All rights reserved.