Interface TemporalSerde<T extends TemporalAccessor>
- Type Parameters:
T- The generic type
- All Superinterfaces:
Deserializer<T>,Serde<T>,Serializer<T>
- All Known Implementing Classes:
DefaultFormattedTemporalSerde,InstantSerde,LocalDateSerde,LocalDateTimeSerde,LocalTimeSerde,OffsetDateTimeSerde,YearSerde,ZonedDateTimeSerde
Interface for serializing and deserializing temporals.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.micronaut.serde.Deserializer
Deserializer.DecoderContextNested classes/interfaces inherited from interface io.micronaut.serde.Serializer
Serializer.EncoderContext -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault Deserializer<T>createSpecific(Deserializer.DecoderContext decoderContext, io.micronaut.core.type.Argument<? super T> context) Create a new child deserializer or return this if non is necessary for the given context.default Serializer<T>createSpecific(Serializer.EncoderContext context, io.micronaut.core.type.Argument<? extends T> type) Create a more specific serializer for the given definition.@NonNull TemporalQuery<T>query()Methods inherited from interface io.micronaut.serde.Deserializer
allowNull, deserialize, deserializeNullable, getDefaultValueMethods inherited from interface io.micronaut.serde.Serializer
isAbsent, isEmpty, serialize
-
Field Details
-
UTC
-
-
Method Details
-
createSpecific
default Serializer<T> createSpecific(Serializer.EncoderContext context, io.micronaut.core.type.Argument<? extends T> type) Description copied from interface:SerializerCreate a more specific serializer for the given definition.- Specified by:
createSpecificin interfaceSerializer<T extends TemporalAccessor>- Parameters:
context- The encoder contexttype- The type definition including any annotation metadata- Returns:
- The more specific serializer
-
createSpecific
default Deserializer<T> createSpecific(Deserializer.DecoderContext decoderContext, io.micronaut.core.type.Argument<? super T> context) throws SerdeException Description copied from interface:DeserializerCreate a new child deserializer or return this if non is necessary for the given context.- Specified by:
createSpecificin interfaceDeserializer<T extends TemporalAccessor>- Parameters:
decoderContext- The decoder contextcontext- The context, including any annotation metadata and type information to narrow the deserializer type- Returns:
- An instance of the same type of deserializer
- Throws:
SerdeException
-
query
- Returns:
- The temporal query for the type.
-