Supports Collections.singleton(Object) and Collections.singletonList(Object).
| Modifier and Type | Field and Description |
|---|---|
| private static final Class | |
| private static final Class |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | canConvert(Class<T>
the Class representing the object type to be converted type)Overrides com. Implements com. |
| public Object | unmarshal(HierarchicalStreamReader
The stream to read the text from. reader, UnmarshallingContext context)Overrides com. Implements com. |
| LIST | back to summary |
|---|---|
| private static final Class<T> LIST | |
| SET | back to summary |
|---|---|
| private static final Class<T> SET | |
| SingletonCollectionConverter | back to summary |
|---|---|
| public SingletonCollectionConverter(Mapper mapper) Construct a SingletonCollectionConverter.
| |
| canConvert | back to summary |
|---|---|
| public boolean canConvert(Class<T> type) Overrides com. Implements com. Doc from com. Determines whether the converter can marshall a particular type.
| |
| unmarshal | back to summary |
|---|---|
| public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) Overrides com. Implements com. Doc from com. Convert textual data back into an object.
| |