@HandleClassMetadata @HandleBeanView public abstract class BaseLocalConverter<T extends org.joda.time.base.BaseLocal> extends Object implements Converter<T>
| Modifier and Type | Field and Description |
|---|---|
protected org.joda.time.format.DateTimeFormatter |
formatter |
| Modifier | Constructor and Description |
|---|---|
protected |
BaseLocalConverter(org.joda.time.format.DateTimeFormatter formatter) |
| Modifier and Type | Method and Description |
|---|---|
T |
deserialize(ObjectReader reader,
Context ctx) |
protected abstract T |
fromLong(long value) |
protected abstract T |
fromString(String value) |
void |
serialize(T object,
ObjectWriter writer,
Context ctx) |
protected BaseLocalConverter(org.joda.time.format.DateTimeFormatter formatter)
public void serialize(T object, ObjectWriter writer, Context ctx) throws Exception
serialize in interface Converter<T extends org.joda.time.base.BaseLocal>serialize in interface Serializer<T extends org.joda.time.base.BaseLocal>object - 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.JsonBindingExceptionJsonStreamExceptionExceptionpublic T deserialize(ObjectReader reader, Context ctx) throws Exception
deserialize in interface Converter<T extends org.joda.time.base.BaseLocal>deserialize in interface Deserializer<T extends org.joda.time.base.BaseLocal>reader - used to read data from.ctx - the current context.JsonBindingExceptionJsonStreamExceptionExceptionprotected abstract T fromLong(long value)
Copyright © 2019. All rights reserved.