Class InstantSerde
java.lang.Object
io.micronaut.serde.support.serdes.DefaultFormattedTemporalSerde<Instant>
io.micronaut.serde.support.serdes.InstantSerde
- All Implemented Interfaces:
io.micronaut.core.order.Ordered, Deserializer<Instant>, Serde<Instant>, Serializer<Instant>, DeserializerRegistrar<Instant>, SerdeRegistrar<Instant>, TemporalSerde<Instant>, SerializerRegistrar<Instant>
public final class InstantSerde
extends DefaultFormattedTemporalSerde<Instant>
implements TemporalSerde<Instant>, SerdeRegistrar<Instant>
Serde used for
Instant.- Since:
- 1.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface Deserializer
Deserializer.DecoderContextNested classes/interfaces inherited from interface Serializer
Serializer.EncoderContext -
Field Summary
Fields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCEFields inherited from interface TemporalSerde
UTC -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected DefaultFormattedTemporalSerde<Instant> createSpecific(SerdeConfiguration configuration) Create the same serde with new configuration.protected InstantfromNanos(long seconds, int nanos) protected intgetNanoPart(Instant value) protected longgetSecondPart(Instant value) io.micronaut.core.type.Argument<Instant> getType()query()Methods inherited from class DefaultFormattedTemporalSerde
createSpecific, createSpecific, deserialize, serializeMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Deserializer
deserialize, deserializeNullable, getDefaultValueMethods inherited from interface io.micronaut.core.order.Ordered
getOrderMethods inherited from interface SerdeRegistrar
getTypesMethods inherited from interface Serializer
isAbsent, isDefault, isEmpty, serializeMethods inherited from interface TemporalSerde
createSpecific, createSpecific
-
Constructor Details
-
InstantSerde
-
-
Method Details
-
query
- Specified by:
queryin interfaceTemporalSerde<Instant>- Returns:
- The temporal query for the type.
-
getSecondPart
-
getNanoPart
-
fromNanos
-
createSpecific
Description copied from class:DefaultFormattedTemporalSerdeCreate the same serde with new configuration.- Overrides:
createSpecificin classDefaultFormattedTemporalSerde<Instant>- Parameters:
configuration- The new configuration- Returns:
- The updated serde
-
getType
- Specified by:
getTypein interfaceDeserializerRegistrar<Instant>- Specified by:
getTypein interfaceSerdeRegistrar<Instant>- Specified by:
getTypein interfaceSerializerRegistrar<Instant>- Returns:
- The serde argument type
-