Interface NumberSerde<N extends Number>
- Type Parameters:
N
- The number type
- All Superinterfaces:
Deserializer<N>
,Serde<N>
,Serializer<N>
Number serializer that handles formatting.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.micronaut.serde.Deserializer
Deserializer.DecoderContext
Nested classes/interfaces inherited from interface io.micronaut.serde.Serializer
Serializer.EncoderContext
-
Method Summary
Modifier and TypeMethodDescriptiondefault Deserializer<N>
createSpecific
(Deserializer.DecoderContext decoderContext, io.micronaut.core.type.Argument<? super N> context) Create a new child deserializer or return this if non is necessary for the given context.default Serializer<N>
createSpecific
(Serializer.EncoderContext context, io.micronaut.core.type.Argument<? extends N> type) Create a more specific serializer for the given definition.Methods inherited from interface io.micronaut.serde.Deserializer
allowNull, deserialize, deserializeNullable, getDefaultValue
Methods inherited from interface io.micronaut.serde.Serializer
isAbsent, isEmpty, serialize
-
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 interfaceDeserializer<N extends Number>
- 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
-
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 interfaceSerializer<N extends Number>
- Parameters:
context
- The encoder contexttype
- The type definition including any annotation metadata- Returns:
- The more specific serializer
-