Class AtomicReferenceDeserializer
- java.lang.Object
 - 
- com.fasterxml.jackson.databind.JsonDeserializer<T>
 - 
- com.fasterxml.jackson.databind.deser.std.StdDeserializer<T>
 - 
- com.fasterxml.jackson.databind.deser.std.ReferenceTypeDeserializer<java.util.concurrent.atomic.AtomicReference<java.lang.Object>>
 - 
- com.fasterxml.jackson.databind.deser.std.AtomicReferenceDeserializer
 
 
 
 
 
- 
- All Implemented Interfaces:
 ContextualDeserializer,NullValueProvider,ValueInstantiator.Gettable,java.io.Serializable
public class AtomicReferenceDeserializer extends ReferenceTypeDeserializer<java.util.concurrent.atomic.AtomicReference<java.lang.Object>>
- See Also:
 - Serialized Form
 
 
- 
- 
Nested Class Summary
- 
Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonDeserializer
JsonDeserializer.None 
 - 
 
- 
Constructor Summary
Constructors Constructor Description AtomicReferenceDeserializer(JavaType fullType, ValueInstantiator inst, TypeDeserializer typeDeser, JsonDeserializer<?> deser) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectgetAbsentValue(DeserializationContext ctxt)Let's actually NOT coerce missing Creator parameters into empty value.java.lang.ObjectgetEmptyValue(DeserializationContext ctxt)Method called to determine value to be used for "empty" values (most commonly when deserializing from empty JSON Strings).java.util.concurrent.atomic.AtomicReference<java.lang.Object>getNullValue(DeserializationContext ctxt)Method that can be called to determine value to be used for representing null values (values deserialized when JSON token isJsonToken.VALUE_NULL).java.lang.ObjectgetReferenced(java.util.concurrent.atomic.AtomicReference<java.lang.Object> reference)Method that may be called to find contents of specified reference, if any; or `null` if none.java.util.concurrent.atomic.AtomicReference<java.lang.Object>referenceValue(java.lang.Object contents)java.lang.BooleansupportsUpdate(DeserializationConfig config)By default we assume that updateability mostly relies on value deserializer; if it supports updates, typically that's what matters.java.util.concurrent.atomic.AtomicReference<java.lang.Object>updateReference(java.util.concurrent.atomic.AtomicReference<java.lang.Object> reference, java.lang.Object contents)Method called in case of "merging update", in which we should try update reference instead of creating a new one.AtomicReferenceDeserializerwithResolved(TypeDeserializer typeDeser, JsonDeserializer<?> valueDeser)- 
Methods inherited from class com.fasterxml.jackson.databind.deser.std.ReferenceTypeDeserializer
createContextual, deserialize, deserialize, deserializeWithType, getEmptyAccessPattern, getNullAccessPattern, getValueInstantiator, getValueType, logicalType 
- 
Methods inherited from class com.fasterxml.jackson.databind.deser.std.StdDeserializer
getValueClass, getValueType, handledType 
- 
Methods inherited from class com.fasterxml.jackson.databind.JsonDeserializer
deserializeWithType, findBackReference, getDelegatee, getEmptyValue, getKnownPropertyNames, getNullValue, getObjectIdReader, isCachable, replaceDelegatee, unwrappingDeserializer 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
AtomicReferenceDeserializer
public AtomicReferenceDeserializer(JavaType fullType, ValueInstantiator inst, TypeDeserializer typeDeser, JsonDeserializer<?> deser)
- Since:
 - 2.9
 
 
 - 
 
- 
Method Detail
- 
withResolved
public AtomicReferenceDeserializer withResolved(TypeDeserializer typeDeser, JsonDeserializer<?> valueDeser)
 
- 
getNullValue
public java.util.concurrent.atomic.AtomicReference<java.lang.Object> getNullValue(DeserializationContext ctxt) throws JsonMappingException
Description copied from class:JsonDeserializerMethod that can be called to determine value to be used for representing null values (values deserialized when JSON token isJsonToken.VALUE_NULL). Usually this is simply Java null, but for some types (especially primitives) it may be necessary to use non-null values.This method may be called once, or multiple times, depending on what
JsonDeserializer.getNullAccessPattern()returns.Default implementation simply returns null.
- Specified by:
 getNullValuein interfaceNullValueProvider- Specified by:
 getNullValuein classReferenceTypeDeserializer<java.util.concurrent.atomic.AtomicReference<java.lang.Object>>- Throws:
 JsonMappingException
 
- 
getEmptyValue
public java.lang.Object getEmptyValue(DeserializationContext ctxt) throws JsonMappingException
Description copied from class:JsonDeserializerMethod called to determine value to be used for "empty" values (most commonly when deserializing from empty JSON Strings). Usually this is same asJsonDeserializer.getNullValue(com.fasterxml.jackson.databind.DeserializationContext)(which in turn is usually simply Java null), but it can be overridden for specific types. Or, if type should never be converted from empty String, method can also throw an exception.This method may be called once, or multiple times, depending on what
JsonDeserializer.getEmptyAccessPattern()returns.Default implementation simply calls
JsonDeserializer.getNullValue(com.fasterxml.jackson.databind.DeserializationContext)and returns value.- Overrides:
 getEmptyValuein classReferenceTypeDeserializer<java.util.concurrent.atomic.AtomicReference<java.lang.Object>>- Throws:
 JsonMappingException
 
- 
getAbsentValue
public java.lang.Object getAbsentValue(DeserializationContext ctxt) throws JsonMappingException
Let's actually NOT coerce missing Creator parameters into empty value.- Specified by:
 getAbsentValuein interfaceNullValueProvider- Overrides:
 getAbsentValuein classJsonDeserializer<java.util.concurrent.atomic.AtomicReference<java.lang.Object>>- Throws:
 JsonMappingException
 
- 
referenceValue
public java.util.concurrent.atomic.AtomicReference<java.lang.Object> referenceValue(java.lang.Object contents)
- Specified by:
 referenceValuein classReferenceTypeDeserializer<java.util.concurrent.atomic.AtomicReference<java.lang.Object>>
 
- 
getReferenced
public java.lang.Object getReferenced(java.util.concurrent.atomic.AtomicReference<java.lang.Object> reference)
Description copied from class:ReferenceTypeDeserializerMethod that may be called to find contents of specified reference, if any; or `null` if none. Note that method should never fail, so for types that use concept of "absence" vs "presence", `null` is to be returned for both "absent" and "reference to `null`" cases.- Specified by:
 getReferencedin classReferenceTypeDeserializer<java.util.concurrent.atomic.AtomicReference<java.lang.Object>>
 
- 
updateReference
public java.util.concurrent.atomic.AtomicReference<java.lang.Object> updateReference(java.util.concurrent.atomic.AtomicReference<java.lang.Object> reference, java.lang.Object contents)Description copied from class:ReferenceTypeDeserializerMethod called in case of "merging update", in which we should try update reference instead of creating a new one. If this does not succeed, should just create a new instance.- Specified by:
 updateReferencein classReferenceTypeDeserializer<java.util.concurrent.atomic.AtomicReference<java.lang.Object>>
 
- 
supportsUpdate
public java.lang.Boolean supportsUpdate(DeserializationConfig config)
Description copied from class:ReferenceTypeDeserializerBy default we assume that updateability mostly relies on value deserializer; if it supports updates, typically that's what matters. So let's just delegate.- Overrides:
 supportsUpdatein classReferenceTypeDeserializer<java.util.concurrent.atomic.AtomicReference<java.lang.Object>>
 
 - 
 
 -