Package hudson.util
Class XStream2.PassthruConverter<T>
java.lang.Object
hudson.util.XStream2.PassthruConverter<T>
- All Implemented Interfaces:
com.thoughtworks.xstream.converters.Converter,com.thoughtworks.xstream.converters.ConverterMatcher
- Direct Known Subclasses:
Cause.UpstreamCause.ConverterImpl,CauseAction.ConverterImpl,HealthReport.ConverterImpl,HudsonPrivateSecurityRealm.Details.ConverterImpl,ToolInstallation.ToolConverter
- Enclosing class:
- XStream2
public abstract static class XStream2.PassthruConverter<T>
extends Object
implements com.thoughtworks.xstream.converters.Converter
Create a nested
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidbooleancanConvert(Class type) voidmarshal(Object source, com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context) unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context)
-
Constructor Details
-
PassthruConverter
-
-
Method Details
-
canConvert
- Specified by:
canConvertin interfacecom.thoughtworks.xstream.converters.ConverterMatcher
-
marshal
public void marshal(Object source, com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context) - Specified by:
marshalin interfacecom.thoughtworks.xstream.converters.Converter
-
unmarshal
public Object unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context) - Specified by:
unmarshalin interfacecom.thoughtworks.xstream.converters.Converter
-
callback
protected abstract void callback(T obj, com.thoughtworks.xstream.converters.UnmarshallingContext context)
-