Interface NumberSerde<N extends Number>

Type Parameters:
N - The number type
All Superinterfaces:
Deserializer<N>, Serde<N>, Serializer<N>

public interface NumberSerde<N extends Number> extends Serde<N>
Number serializer that handles formatting.
  • Method Details

    • createSpecific

      default Deserializer<N> createSpecific(Deserializer.DecoderContext decoderContext, io.micronaut.core.type.Argument<? super N> 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<N extends Number>
      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
    • createSpecific

      default Serializer<N> createSpecific(Serializer.EncoderContext context, io.micronaut.core.type.Argument<? extends N> type)
      Description copied from interface: Serializer
      Create a more specific serializer for the given definition.
      Specified by:
      createSpecific in interface Serializer<N extends Number>
      Parameters:
      context - The encoder context
      type - The type definition including any annotation metadata
      Returns:
      The more specific serializer