T - public abstract class AbstractBsonSerde<T> extends java.lang.Object implements NullableSerde<T>
Serializer.EncoderContextDeserializer.DecoderContext| Constructor and Description |
|---|
AbstractBsonSerde() |
| Modifier and Type | Method and Description |
|---|---|
T |
deserializeNonNull(Decoder decoder,
Deserializer.DecoderContext decoderContext,
io.micronaut.core.type.Argument<? super T> type)
A method that is invoked when the value is known not to be null.
|
protected abstract T |
doDeserializeNonNull(BsonReaderDecoder decoder,
Deserializer.DecoderContext decoderContext,
io.micronaut.core.type.Argument<? super T> type) |
protected abstract void |
doSerialize(BsonWriterEncoder encoder,
Serializer.EncoderContext context,
T value,
io.micronaut.core.type.Argument<? extends T> type) |
void |
serialize(Encoder encoder,
Serializer.EncoderContext context,
io.micronaut.core.type.Argument<? extends T> type,
T value)
Serializes the given value using the passed
Encoder. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateSpecific, isAbsent, isEmptyallowNull, deserializecreateSpecific, getDefaultValueprotected abstract T doDeserializeNonNull(BsonReaderDecoder decoder, Deserializer.DecoderContext decoderContext, io.micronaut.core.type.Argument<? super T> type) throws java.io.IOException
java.io.IOExceptionprotected abstract void doSerialize(BsonWriterEncoder encoder, Serializer.EncoderContext context, T value, io.micronaut.core.type.Argument<? extends T> type) throws java.io.IOException
java.io.IOExceptionpublic final T deserializeNonNull(Decoder decoder, Deserializer.DecoderContext decoderContext, io.micronaut.core.type.Argument<? super T> type) throws java.io.IOException
NullableDeserializerdeserializeNonNull in interface NullableDeserializer<T>decoder - The decoderdecoderContext - The decoder contexttype - The typejava.io.IOException - if something goes wrong during deserializationpublic final void serialize(Encoder encoder, Serializer.EncoderContext context, io.micronaut.core.type.Argument<? extends T> type, T value) throws java.io.IOException
SerializerEncoder.serialize in interface Serializer<T>encoder - The encoder to usecontext - The encoder context, never nulltype - Models the generic type of the valuevalue - The value, can be nulljava.io.IOException - If an error occurs during serialization