com.alee.utils.collection
Class ValuesTableConverter
java.lang.Object
com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter
com.thoughtworks.xstream.converters.reflection.ReflectionConverter
com.alee.utils.collection.ValuesTableConverter
- All Implemented Interfaces:
- com.thoughtworks.xstream.converters.Converter, com.thoughtworks.xstream.converters.ConverterMatcher, com.thoughtworks.xstream.core.Caching
public class ValuesTableConverter
- extends com.thoughtworks.xstream.converters.reflection.ReflectionConverter
Special XStream converter for ValuesTable object.
- Author:
- Mikle Garin
Nested classes/interfaces inherited from class com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter |
com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.DuplicateFieldException, com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.UnknownFieldException |
Fields inherited from class com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter |
mapper, reflectionProvider, serializationMethodInvoker |
Constructor Summary |
ValuesTableConverter(com.thoughtworks.xstream.mapper.Mapper mapper,
com.thoughtworks.xstream.converters.reflection.ReflectionProvider reflectionProvider)
Constructs new ValuesTableConverter. |
Method Summary |
boolean |
canConvert(java.lang.Class type)
Determines whether the converter can marshall a particular type. |
void |
marshal(java.lang.Object source,
com.thoughtworks.xstream.io.HierarchicalStreamWriter writer,
com.thoughtworks.xstream.converters.MarshallingContext context)
Convert an object to textual data. |
java.lang.Object |
unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader reader,
com.thoughtworks.xstream.converters.UnmarshallingContext context)
Convert textual data back into an object. |
Methods inherited from class com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter |
canAccess, doMarshal, doUnmarshal, flushCache, instantiateNewInstance, marshallField, shouldUnmarshalField, shouldUnmarshalTransientFields, unmarshallField |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ValuesTableConverter
public ValuesTableConverter(com.thoughtworks.xstream.mapper.Mapper mapper,
com.thoughtworks.xstream.converters.reflection.ReflectionProvider reflectionProvider)
- Constructs new ValuesTableConverter.
- Parameters:
mapper
- reflectionProvider
-
canConvert
public boolean canConvert(java.lang.Class type)
- Determines whether the converter can marshall a particular type.
- Specified by:
canConvert
in interface com.thoughtworks.xstream.converters.ConverterMatcher
- Overrides:
canConvert
in class com.thoughtworks.xstream.converters.reflection.ReflectionConverter
- Parameters:
type
- the Class representing the object type to be converted
- Returns:
- true if this class type can be converted using this converter, false otherwise
marshal
public void marshal(java.lang.Object source,
com.thoughtworks.xstream.io.HierarchicalStreamWriter writer,
com.thoughtworks.xstream.converters.MarshallingContext context)
- Convert an object to textual data.
- Specified by:
marshal
in interface com.thoughtworks.xstream.converters.Converter
- Overrides:
marshal
in class com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter
- Parameters:
source
- object to be marshalledwriter
- stream to write tocontext
- context that allows nested objects to be processed by XStream
unmarshal
public java.lang.Object unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader reader,
com.thoughtworks.xstream.converters.UnmarshallingContext context)
- Convert textual data back into an object.
- Specified by:
unmarshal
in interface com.thoughtworks.xstream.converters.Converter
- Overrides:
unmarshal
in class com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter
- Parameters:
reader
- stream to read the text fromcontext
- unmarshalling context
- Returns:
- resulting object