public class DictConverter extends MapConverter implements XStreamStreamer.Converter
Modifier and Type | Field and Description |
---|---|
static String |
DICT_ELEMENT
Dict element.
|
static String |
KEY_ELEMENT
Key element.
|
Constructor and Description |
---|
DictConverter(Mapper mapper)
Constructs a dict converter.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canConvert(Class type) |
void |
marshal(Object source,
HierarchicalStreamWriter writer,
MarshallingContext context) |
protected void |
populateMap(HierarchicalStreamReader reader,
UnmarshallingContext context,
Map map,
Map target) |
boolean |
setUp(XStreamStreamer streamer)
Sets up this.
|
void |
tearDown()
Tears down what has been set up.
|
Object |
unmarshal(HierarchicalStreamReader reader,
UnmarshallingContext context) |
public static final String DICT_ELEMENT
public static final String KEY_ELEMENT
public DictConverter(Mapper mapper)
mapper
- The mapper.public boolean canConvert(Class type)
canConvert
in interface ConverterMatcher
canConvert
in class MapConverter
public void marshal(Object source, HierarchicalStreamWriter writer, MarshallingContext context)
marshal
in interface Converter
marshal
in class MapConverter
public boolean setUp(XStreamStreamer streamer)
setUp
in interface XStreamStreamer.Converter
streamer
- The calling streamer.public void tearDown()
tearDown
in interface XStreamStreamer.Converter
public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context)
unmarshal
in interface Converter
unmarshal
in class MapConverter
protected void populateMap(HierarchicalStreamReader reader, UnmarshallingContext context, Map map, Map target)
populateMap
in class MapConverter
Copyright © 2003-2019 Serge Brisson. All Rights Reserved.