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 Deserializer
Deserializer.DecoderContextNested classes/interfaces inherited from interface 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 Deserializer
deserialize, deserializeNullable, getDefaultValueMethods inherited from interface Serializer
isAbsent, isDefault, 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
@NonNull TemporalQuery<T> query()- Returns:
- The temporal query for the type.
-