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

public interface TemporalSerde<T extends TemporalAccessor> extends Serde<T>
Interface for serializing and deserializing temporals.
  • Field Details

    • UTC

      static final ZoneId UTC
  • Method Details

    • createSpecific

      default Serializer<T> createSpecific(Serializer.EncoderContext context, io.micronaut.core.type.Argument<? extends T> type)
      Description copied from interface: Serializer
      Create a more specific serializer for the given definition.
      Specified by:
      createSpecific in interface Serializer<T extends TemporalAccessor>
      Parameters:
      context - The encoder context
      type - 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: Deserializer
      Create a new child deserializer or return this if non is necessary for the given context.
      Specified by:
      createSpecific in interface Deserializer<T extends TemporalAccessor>
      Parameters:
      decoderContext - The decoder context
      context - 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 @NonNull TemporalQuery<T> query()
      Returns:
      The temporal query for the type.