@HandleClassMetadata public static class DefaultConverters.CollectionConverter<E> extends Object implements Converter<Collection<E>>
| Constructor and Description |
|---|
CollectionConverter(Class<E> eClass,
Converter<E> elementConverter) |
| Modifier and Type | Method and Description |
|---|---|
protected Collection<E> |
create() |
Collection<E> |
deserialize(ObjectReader reader,
Context ctx) |
Converter<E> |
getElementConverter() |
void |
serialize(Collection<E> array,
ObjectWriter writer,
Context ctx) |
public Collection<E> deserialize(ObjectReader reader, Context ctx) throws Exception
deserialize in interface Converter<Collection<E>>deserialize in interface Deserializer<Collection<E>>reader - used to read data from.ctx - the current context.JsonBindingExceptionJsonStreamExceptionExceptionpublic void serialize(Collection<E> array, ObjectWriter writer, Context ctx) throws Exception
serialize in interface Converter<Collection<E>>serialize in interface Serializer<Collection<E>>array - we want to serialize. The object is of type T or a subclass (if this serializer
has been registered for subclasses).writer - to use to write data to the output stream.ctx - the current context.JsonBindingExceptionJsonStreamExceptionExceptionprotected Collection<E> create()
Copyright © 2019. All rights reserved.