public class NamedCollectionConverter extends CollectionConverter
To be used as local converter. Note, suppress the usage of the implicit type argument, if registered with annotation.
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
name |
private java.lang.Class |
type |
| Constructor and Description |
|---|
NamedCollectionConverter(java.lang.Class type,
Mapper mapper,
java.lang.String itemName,
java.lang.Class itemType)
Constructs a NamedCollectionConverter handling an explicit Collection type.
|
NamedCollectionConverter(Mapper mapper,
java.lang.String itemName,
java.lang.Class itemType)
Constructs a NamedCollectionConverter.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.Object |
readItem(HierarchicalStreamReader reader,
UnmarshallingContext context,
java.lang.Object current) |
protected void |
writeItem(java.lang.Object item,
MarshallingContext context,
HierarchicalStreamWriter writer) |
addCurrentElementToCollection, canConvert, createCollection, marshal, populateCollection, populateCollection, unmarshalmapperpublic NamedCollectionConverter(Mapper mapper, java.lang.String itemName, java.lang.Class itemType)
mapper - the mapperitemName - the name of the itemsitemType - the base type of the itemspublic NamedCollectionConverter(java.lang.Class type,
Mapper mapper,
java.lang.String itemName,
java.lang.Class itemType)
type - the Collection type to handlemapper - the mapperitemName - the name of the itemsitemType - the base type of the itemsprotected void writeItem(java.lang.Object item,
MarshallingContext context,
HierarchicalStreamWriter writer)
writeItem in class AbstractCollectionConverterprotected java.lang.Object readItem(HierarchicalStreamReader reader, UnmarshallingContext context, java.lang.Object current)
readItem in class AbstractCollectionConverter