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 nestedConverterImpl
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 Modifier Constructor Description protected
PassthruConverter(XStream2 xstream)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method 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)
-
-
-
Constructor Detail
-
PassthruConverter
protected PassthruConverter(XStream2 xstream)
-
-
Method Detail
-
canConvert
public boolean canConvert(Class type)
- Specified by:
canConvert
in 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:
marshal
in interfacecom.thoughtworks.xstream.converters.Converter
-
unmarshal
public Object unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context)
- Specified by:
unmarshal
in interfacecom.thoughtworks.xstream.converters.Converter
-
callback
protected abstract void callback(T obj, com.thoughtworks.xstream.converters.UnmarshallingContext context)
-
-