T
- type of objects this BeanViewConverter can handle.public class BeanViewConverter<T> extends Wrapper<Converter<T>> implements Converter<T>
BeanViewDescriptorProvider
,
BeanView
Modifier and Type | Class and Description |
---|---|
static class |
BeanViewConverter.BeanViewConverterFactory |
Constructor and Description |
---|
BeanViewConverter(Type type,
BeanViewDescriptorProvider provider,
Converter<T> next) |
Modifier and Type | Method and Description |
---|---|
T |
deserialize(ObjectReader reader,
Context ctx) |
protected Class<? extends BeanView<T>> |
findViewFor(Type type,
List<Class<? extends BeanView<?>>> views) |
void |
serialize(T obj,
ObjectWriter writer,
Context ctx) |
decorate, getAnnotation, getAnnotations, getDeclaredAnnotations, isAnnotationPresent, isOfType, isWrapped, toAnnotatedElement, unwrap
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAnnotationsByType, getDeclaredAnnotation, getDeclaredAnnotationsByType
public BeanViewConverter(Type type, BeanViewDescriptorProvider provider, Converter<T> next)
protected Class<? extends BeanView<T>> findViewFor(Type type, List<Class<? extends BeanView<?>>> views)
public void serialize(T obj, ObjectWriter writer, Context ctx) throws Exception
serialize
in interface Converter<T>
serialize
in interface Serializer<T>
obj
- 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.JsonBindingException
JsonStreamException
Exception
public T deserialize(ObjectReader reader, Context ctx) throws Exception
deserialize
in interface Converter<T>
deserialize
in interface Deserializer<T>
reader
- used to read data from.ctx
- the current context.JsonBindingException
JsonStreamException
Exception
Copyright © 2019. All rights reserved.