@Singleton @Primary public class ObjectDeserializer extends java.lang.Object implements NullableDeserializer<java.lang.Object>, UpdatingDeserializer<java.lang.Object>
Deserializer.DecoderContext
Constructor and Description |
---|
ObjectDeserializer(SerdeIntrospections introspections,
DeserializationConfiguration deserializationConfiguration) |
Modifier and Type | Method and Description |
---|---|
boolean |
allowNull() |
void |
deserializeInto(Decoder decoder,
Deserializer.DecoderContext decoderContext,
io.micronaut.core.type.Argument<? super java.lang.Object> type,
java.lang.Object value)
Deserializes from the current state of the
Decoder an object of type T . |
java.lang.Object |
deserializeNonNull(Decoder decoder,
Deserializer.DecoderContext decoderContext,
io.micronaut.core.type.Argument<? super java.lang.Object> type)
A method that is invoked when the value is known not to be null.
|
<T> io.micronaut.serde.support.deserializers.DeserBean<T> |
getDeserializableBean(io.micronaut.core.type.Argument<T> type,
Deserializer.DecoderContext decoderContext) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
deserialize
createSpecific, getDefaultValue
public ObjectDeserializer(SerdeIntrospections introspections, DeserializationConfiguration deserializationConfiguration)
public java.lang.Object deserializeNonNull(Decoder decoder, Deserializer.DecoderContext decoderContext, io.micronaut.core.type.Argument<? super java.lang.Object> type) throws java.io.IOException
NullableDeserializer
deserializeNonNull
in interface NullableDeserializer<java.lang.Object>
decoder
- The decoderdecoderContext
- The decoder contexttype
- The typejava.io.IOException
- if something goes wrong during deserializationpublic boolean allowNull()
allowNull
in interface Deserializer<java.lang.Object>
allowNull
in interface NullableDeserializer<java.lang.Object>
null
public <T> io.micronaut.serde.support.deserializers.DeserBean<T> getDeserializableBean(io.micronaut.core.type.Argument<T> type, Deserializer.DecoderContext decoderContext)
public void deserializeInto(Decoder decoder, Deserializer.DecoderContext decoderContext, io.micronaut.core.type.Argument<? super java.lang.Object> type, java.lang.Object value) throws java.io.IOException
UpdatingDeserializer
Decoder
an object of type T
.deserializeInto
in interface UpdatingDeserializer<java.lang.Object>
decoder
- The decoder, never null
decoderContext
- The decoder context, never null
type
- The generic type to be deserializedvalue
- The valuejava.io.IOException
- If an error occurs during deserialization of the object