Class AbstractPropertyConverter<T>
- java.lang.Object
-
- ch.sahits.game.openpatrician.utilities.service.converter.AbstractPropertyConverter<T>
-
- All Implemented Interfaces:
com.thoughtworks.xstream.converters.Converter
,com.thoughtworks.xstream.converters.ConverterMatcher
- Direct Known Subclasses:
BooleanPropertyConverter
,DoublePropertyConverter
,IntegerPropertyConverter
,LongPropertyConverter
,ObjectPropertyConverter
public abstract class AbstractPropertyConverter<T> extends java.lang.Object implements com.thoughtworks.xstream.converters.Converter
Base class for all property converters.
Created at 17/09/11 10:58.- Author:
- Antoine Mischler
-
-
Constructor Summary
Constructors Constructor Description AbstractPropertyConverter(java.lang.Class clazz, com.thoughtworks.xstream.mapper.Mapper mapper)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
canConvert(java.lang.Class type)
protected abstract javafx.beans.value.WritableValue<T>
createProperty()
void
marshal(java.lang.Object source, com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context)
protected abstract java.lang.Class<? extends T>
readType(com.thoughtworks.xstream.io.HierarchicalStreamReader reader)
java.lang.Object
unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context)
protected void
writeValue(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context, T value)
-
-
-
Method Detail
-
marshal
public void marshal(java.lang.Object source, com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context)
- Specified by:
marshal
in interfacecom.thoughtworks.xstream.converters.Converter
-
writeValue
protected void writeValue(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context, T value)
-
unmarshal
public java.lang.Object unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context)
- Specified by:
unmarshal
in interfacecom.thoughtworks.xstream.converters.Converter
-
createProperty
protected abstract javafx.beans.value.WritableValue<T> createProperty()
-
readType
protected abstract java.lang.Class<? extends T> readType(com.thoughtworks.xstream.io.HierarchicalStreamReader reader)
-
canConvert
public boolean canConvert(java.lang.Class type)
- Specified by:
canConvert
in interfacecom.thoughtworks.xstream.converters.ConverterMatcher
-
-