@Singleton public class YearSerde extends java.lang.Object implements TemporalSerde<java.time.Year>
Serializer.EncoderContextDeserializer.DecoderContextUTC| Constructor and Description |
|---|
YearSerde() |
| Modifier and Type | Method and Description |
|---|---|
java.time.Year |
deserializeNonNull(Decoder decoder,
Deserializer.DecoderContext decoderContext,
io.micronaut.core.type.Argument<? super java.time.Year> type)
A method that is invoked when the value is known not to be null.
|
java.time.temporal.TemporalQuery<java.time.Year> |
query() |
void |
serialize(Encoder encoder,
Serializer.EncoderContext context,
io.micronaut.core.type.Argument<? extends java.time.Year> type,
java.time.Year value)
Serializes the given value using the passed
Encoder. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateSpecific, createSpecificisAbsent, isEmptyallowNull, deserializegetDefaultValuepublic void serialize(Encoder encoder, Serializer.EncoderContext context, io.micronaut.core.type.Argument<? extends java.time.Year> type, java.time.Year value) throws java.io.IOException
SerializerEncoder.serialize in interface Serializer<java.time.Year>encoder - The encoder to usecontext - The encoder context, never nulltype - Models the generic type of the valuevalue - The value, can be nulljava.io.IOException - If an error occurs during serializationpublic java.time.temporal.TemporalQuery<java.time.Year> query()
query in interface TemporalSerde<java.time.Year>public java.time.Year deserializeNonNull(Decoder decoder, Deserializer.DecoderContext decoderContext, io.micronaut.core.type.Argument<? super java.time.Year> type) throws java.io.IOException
NullableDeserializerdeserializeNonNull in interface NullableDeserializer<java.time.Year>decoder - The decoderdecoderContext - The decoder contexttype - The typejava.io.IOException - if something goes wrong during deserialization