To be used as local converter. Note, suppress the usage of the implicit type argument, if registered with annotation.
| Access | Constructor and Description |
|---|---|
| public | NamedCollectionConverter(Mapper
the mapper mapper, String the name of the items itemName, Class<T> the base type of the items itemType)Constructs a NamedCollectionConverter. |
| public | NamedCollectionConverter(Class<T>
the Collection type to handle type, Mapper the mapper mapper, String the name of the items itemName, Class<T> the base type of the items itemType)Constructs a NamedCollectionConverter handling an explicit Collection type. |
| Modifier and Type | Method and Description |
|---|---|
| protected Object | readBareItem(final HierarchicalStreamReader
the source reader reader, final UnmarshallingContext the unmarshalling context context, final Object the target collection (if already available) current)Overrides com. |
| protected void | writeCompleteItem(final Object
the item to write item, final MarshallingContext the current marshalling context context, final HierarchicalStreamWriter the target writer writer)Overrides com. |
| protected void | writeItem(Object item, MarshallingContext context, HierarchicalStreamWriter writer)
Overrides com.
Deprecated
As of 1.4.11 use
writeCompleteItem(Object, MarshallingContext, HierarchicalStreamWriter)
instead.
|
| name | back to summary |
|---|---|
| private final String name | |
| type | back to summary |
|---|---|
| private final Class<T> type Hides com. | |
| NamedCollectionConverter | back to summary |
|---|---|
| public NamedCollectionConverter(Mapper mapper, String itemName, Class<T> itemType) Constructs a NamedCollectionConverter. | |
| NamedCollectionConverter | back to summary |
|---|---|
| public NamedCollectionConverter(Class<T> type, Mapper mapper, String itemName, Class<T> itemType) Constructs a NamedCollectionConverter handling an explicit Collection type. | |
| readBareItem | back to summary |
|---|---|
| protected Object readBareItem(final HierarchicalStreamReader reader, final UnmarshallingContext context, final Object current) Overrides com. Doc from com. Read a bare item of the collection from the reader.
| |
| writeCompleteItem | back to summary |
|---|---|
| protected void writeCompleteItem(final Object item, final MarshallingContext context, final HierarchicalStreamWriter writer) Overrides com. Doc from com. Write an item of the collection into the writer including surrounding tags.
| |
| writeItem | back to summary |
|---|---|
| protected void writeItem(Object item, MarshallingContext context, HierarchicalStreamWriter writer) Overrides com. Deprecated As of 1.4.11 use | |