T
- the type this converter is handling.public class RuntimeTypeConverter<T> extends Wrapper<Converter<T>> implements Converter<T>
Modifier and Type | Class and Description |
---|---|
static class |
RuntimeTypeConverter.RuntimeTypeConverterFactory |
Constructor and Description |
---|
RuntimeTypeConverter(Class<T> tClass,
Converter<T> next) |
Modifier and Type | Method and Description |
---|---|
T |
deserialize(ObjectReader reader,
Context ctx) |
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 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.