To be used as local converter.
| Modifier and Type | Field and Description |
|---|---|
| private final Class | |
| private final String | |
| private final Mapper |
| Access | Constructor and Description |
|---|---|
| public | NamedArrayConverter(final Class<T> arrayType, final Mapper mapper, final String itemName)
Construct a NamedArrayConverter. |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | canConvert(final Class<T>
the Class representing the object type to be converted type)Implements com. |
| public void | marshal(final Object
The object to be marshalled. source, final HierarchicalStreamWriter A stream to write to. writer, final MarshallingContext A context that allows nested objects to be processed by XStream. context)Implements com. |
| public Object | unmarshal(final HierarchicalStreamReader
The stream to read the text from. reader, final UnmarshallingContext context)Implements com. |
| arrayType | back to summary |
|---|---|
| private final Class<T> arrayType | |
| itemName | back to summary |
|---|---|
| private final String itemName | |
| mapper | back to summary |
|---|---|
| private final Mapper mapper | |
| NamedArrayConverter | back to summary |
|---|---|
| public NamedArrayConverter(final Class<T> arrayType, final Mapper mapper, final String itemName) Construct a NamedArrayConverter.
| |
| canConvert | back to summary |
|---|---|
| public boolean canConvert(final Class<T> type) Implements com. Doc from com. Determines whether the converter can marshall a particular type.
| |
| marshal | back to summary |
|---|---|
| public void marshal(final Object source, final HierarchicalStreamWriter writer, final MarshallingContext context) Implements com. Doc from com. Convert an object to textual data.
| |
| unmarshal | back to summary |
|---|---|
| public Object unmarshal(final HierarchicalStreamReader reader, final UnmarshallingContext context) Implements com. Doc from com. Convert textual data back into an object.
| |