public class MapConverter
extends com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter
| Constructor and Description |
|---|
MapConverter(com.thoughtworks.xstream.mapper.Mapper mapper)
Create a MapConverter that use use the supplied mapper.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canConvert(Class clazz)
Can this Converter convert the type supplied.
|
void |
marshal(Object source,
com.thoughtworks.xstream.io.HierarchicalStreamWriter writer,
com.thoughtworks.xstream.converters.MarshallingContext context)
output the Map in the simplified form.
|
Object |
unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader reader,
com.thoughtworks.xstream.converters.UnmarshallingContext context)
Convert a suitably positioned reader stream into a Map object.
|
public MapConverter(com.thoughtworks.xstream.mapper.Mapper mapper)
mapper - the mapped to base the conversion on.public void marshal(Object source, com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context)
marshal in interface com.thoughtworks.xstream.converters.Convertermarshal in class com.thoughtworks.xstream.converters.collections.AbstractCollectionConvertersource - the object to be outputwriter - the writer to use to perform the output.context - the context in which to perform the output.Converter.marshal(java.lang.Object,
com.thoughtworks.xstream.io.HierarchicalStreamWriter,
com.thoughtworks.xstream.converters.MarshallingContext)public Object unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context)
unmarshal in interface com.thoughtworks.xstream.converters.Converterunmarshal in class com.thoughtworks.xstream.converters.collections.AbstractCollectionConverterreader - the stream reader positioned at the start of the object.context - the unmarshalling context.Converter.unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader,
com.thoughtworks.xstream.converters.UnmarshallingContext)public boolean canConvert(Class clazz)
canConvert in interface com.thoughtworks.xstream.converters.ConverterMatchercanConvert in class com.thoughtworks.xstream.converters.collections.AbstractCollectionConverterclazz - the type being converted.ConverterMatcher.canConvert(java.lang.Class)Copyright © 2007-2012. All Rights Reserved.