Typically, subclasses of this will converter the outer structure of the collection, loop through the contents and call readItem() or writeItem() for each item.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public abstract boolean | canConvert(Class<T>
the Class representing the object type to be converted type)Redeclares com. |
| protected Object | |
| protected Mapper | |
| public abstract void | marshal(Object
The object to be marshalled. source, HierarchicalStreamWriter A stream to write to. writer, MarshallingContext A context that allows nested objects to be processed by XStream. context)Redeclares com. |
| protected Object | Returns: the read itemthe source reader reader, final UnmarshallingContext the unmarshalling context context, final Object the target collection (if already available) current)Read a bare item of the collection from the reader. |
| protected Object | Returns: the read itemthe source reader reader, final UnmarshallingContext the unmarshalling context context, final Object the target collection (if already available) current)Read an item of the collection including the tags from the reader. |
| protected Object | readItem(final HierarchicalStreamReader reader, final UnmarshallingContext context, final Object current)
Deprecated
As of 1.4.11 use
readBareItem(HierarchicalStreamReader, UnmarshallingContext, Object) or
readCompleteItem(HierarchicalStreamReader, UnmarshallingContext, Object) instead.
|
| public abstract Object | unmarshal(HierarchicalStreamReader
The stream to read the text from. reader, UnmarshallingContext context)Redeclares com. |
| protected void | writeBareItem(final Object
the item to write item, final MarshallingContext the current marshalling context context, final HierarchicalStreamWriter the target writer writer)Write the bare item of the collection into the writer. |
| protected void | writeCompleteItem(final Object
the item to write item, final MarshallingContext the current marshalling context context, final HierarchicalStreamWriter the target writer writer)Write an item of the collection into the writer including surrounding tags. |
| protected void | writeItem(Object item, MarshallingContext context, HierarchicalStreamWriter writer)
Deprecated
As of 1.4.11 use
writeCompleteItem(Object, MarshallingContext, HierarchicalStreamWriter)
instead.
|
| protected void | writeNullItem(final MarshallingContext
the current marshalling context context, final HierarchicalStreamWriter the target writer writer)Write a null item of the collection into the writer. |
| mapper | back to summary |
|---|---|
| private final Mapper mapper | |
| AbstractCollectionConverter | back to summary |
|---|---|
| public AbstractCollectionConverter(Mapper mapper) | |
| canConvert | back to summary |
|---|---|
| public abstract boolean canConvert(Class<T> type) Redeclares com. Doc from com. Determines whether the converter can marshall a particular type.
| |
| createCollection | back to summary |
|---|---|
| protected Object createCollection(Class<T> type) | |
| mapper | back to summary |
|---|---|
| protected Mapper mapper() | |
| marshal | back to summary |
|---|---|
| public abstract void marshal(Object source, HierarchicalStreamWriter writer, MarshallingContext context) Redeclares com. Doc from com. Convert an object to textual data.
| |
| readBareItem | back to summary |
|---|---|
| protected Object readBareItem(final HierarchicalStreamReader reader, final UnmarshallingContext context, final Object current) Read a bare item of the collection from the reader.
| |
| readCompleteItem | back to summary |
|---|---|
| protected Object readCompleteItem(final HierarchicalStreamReader reader, final UnmarshallingContext context, final Object current) Read an item of the collection including the tags from the reader.
| |
| readItem | back to summary |
|---|---|
| protected Object readItem(final HierarchicalStreamReader reader, final UnmarshallingContext context, final Object current)
Deprecated As of 1.4.11 use | |
| unmarshal | back to summary |
|---|---|
| public abstract Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) Redeclares com. Doc from com. Convert textual data back into an object.
| |
| writeBareItem | back to summary |
|---|---|
| protected void writeBareItem(final Object item, final MarshallingContext context, final HierarchicalStreamWriter writer) Write the bare item of the collection into the writer.
| |
| writeCompleteItem | back to summary |
|---|---|
| protected void writeCompleteItem(final Object item, final MarshallingContext context, final HierarchicalStreamWriter writer) 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)
Deprecated As of 1.4.11 use | |
| writeNullItem | back to summary |
|---|---|
| protected void writeNullItem(final MarshallingContext context, final HierarchicalStreamWriter writer) Write a null item of the collection into the writer. The method readItem should be able to process the written data i.e. it has to write the tags or may not write anything at all.
| |