com.fasterxml.jackson.databind.deser.std

## 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<AtomicReference<Object>>
      - - com.fasterxml.jackson.databind.deser.std.AtomicReferenceDeserializer

All Implemented Interfaces:
  ContextualDeserializer, NullValueProvider, ValueInstantiator.Gettable, Serializable

    public class AtomicReferenceDeserializer
    extends ReferenceTypeDeserializer<AtomicReference<Object>>

See Also:
  Serialized Form

### Nested Class Summary

### Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonDeserializer

`JsonDeserializer.None`

### Field Summary

### Fields inherited from class com.fasterxml.jackson.databind.deser.std.ReferenceTypeDeserializer

`_fullType, _valueDeserializer, _valueInstantiator, _valueTypeDeserializer`

### Fields inherited from class com.fasterxml.jackson.databind.deser.std.StdDeserializer

`_valueClass, _valueType, F_MASK_ACCEPT_ARRAYS, F_MASK_INT_COERCIONS`

### Constructor Summary

Constructors
Constructor and Description
`AtomicReferenceDeserializer(JavaType fullType, ValueInstantiator inst, TypeDeserializer typeDeser, JsonDeserializer<?> deser)`

### Method Summary

All Methods Instance Methods Concrete Methods
`Object` `getAbsentValue(DeserializationContext ctxt)` Let's actually NOT coerce missing Creator parameters into empty value.
`Object` `getEmptyValue(DeserializationContext ctxt)` Method called to determine value to be used for "empty" values (most commonly when deserializing from empty JSON Strings).
`AtomicReference<Object>` `getNullValue(DeserializationContext ctxt)` Method that can be called to determine value to be used for representing null values (values deserialized when JSON token is `JsonToken.VALUE_NULL`).
`Object` `getReferenced(AtomicReference<Object> reference)` Method that may be called to find contents of specified reference, if any; or `null` if none.
`AtomicReference<Object>` `referenceValue(Object contents)`
`Boolean` `supportsUpdate(DeserializationConfig config)` By default we assume that updateability mostly relies on value deserializer; if it supports updates, typically that's what matters.
`AtomicReference<Object>` `updateReference(AtomicReference<Object> reference, Object contents)` Method called in case of "merging update", in which we should try update reference instead of creating a new one.
`AtomicReferenceDeserializer` `withResolved(TypeDeserializer typeDeser, JsonDeserializer<?> valueDeser)` Mutant factory method called when changes are needed; should construct newly configured instance with new values as indicated.

### 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

`_byteOverflow, _checkCoercionFail, _checkDoubleSpecialValue, _checkFloatSpecialValue, _checkFloatToIntCoercion, _checkFromStringCoercion, _checkFromStringCoercion, _checkTextualNull, _coerceBooleanFromInt, _coercedTypeDesc, _coerceEmptyString, _coerceIntegral, _coerceNullToken, _coerceTextualNull, _deserializeFromArray, _deserializeFromEmpty, _deserializeFromEmptyString, _deserializeFromString, _deserializeWrappedValue, _failDoubleToIntCoercion, _findCoercionFromBlankString, _findCoercionFromEmptyArray, _findCoercionFromEmptyString, _findNullProvider, _hasTextualNull, _intOverflow, _isBlank, _isEmptyOrTextualNull, _isFalse, _isIntNumber, _isNaN, _isNegInf, _isPosInf, _isTrue, _neitherNull, _nonNullNumber, _parseBoolean, _parseBooleanFromInt, _parseBooleanPrimitive, _parseBooleanPrimitive, _parseBytePrimitive, _parseDate, _parseDate, _parseDateFromArray, _parseDouble, _parseDoublePrimitive, _parseDoublePrimitive, _parseFloatPrimitive, _parseFloatPrimitive, _parseInteger, _parseInteger, _parseIntPrimitive, _parseIntPrimitive, _parseLong, _parseLong, _parseLongPrimitive, _parseLongPrimitive, _parseShortPrimitive, _parseString, _reportFailedNullCoerce, _shortOverflow, _verifyEndArrayForSingle, _verifyNullForPrimitive, _verifyNullForPrimitiveCoercion, _verifyNullForScalarCoercion, _verifyNumberForScalarCoercion, _verifyStringForScalarCoercion, findContentNullProvider, findContentNullStyle, findConvertingContentDeserializer, findDeserializer, findFormatFeature, findFormatOverrides, findValueNullProvider, getValueClass, getValueType, handledType, handleMissingEndArrayForSingle, handleNestedArrayForSingle, handleUnknownProperty, isDefaultDeserializer, isDefaultKeyDeserializer`

### Methods inherited from class com.fasterxml.jackson.databind.JsonDeserializer

`deserializeWithType, findBackReference, getDelegatee, getEmptyValue, getKnownPropertyNames, getNullValue, getObjectIdReader, isCachable, replaceDelegatee, unwrappingDeserializer`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### 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)

Description copied from class: `ReferenceTypeDeserializer`
Mutant factory method called when changes are needed; should construct newly configured instance with new values as indicated.

NOTE: caller has verified that there are changes, so implementations need NOT check if a new instance is needed.

Specified by:
  `withResolved` in class `ReferenceTypeDeserializer<AtomicReference<Object>>`

#### getNullValue

    public AtomicReference<Object> getNullValue(DeserializationContext ctxt)
                                         throws JsonMappingException

Description copied from class: `JsonDeserializer`
Method that can be called to determine value to be used for representing null values (values deserialized when JSON token is `JsonToken.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:
  `getNullValue` in interface `NullValueProvider`
Specified by:
  `getNullValue` in class `ReferenceTypeDeserializer<AtomicReference<Object>>`
Throws:
  `JsonMappingException`

#### getEmptyValue

    public Object getEmptyValue(DeserializationContext ctxt)
                         throws JsonMappingException

Description copied from class: `JsonDeserializer`
Method called to determine value to be used for "empty" values (most commonly when deserializing from empty JSON Strings). Usually this is same as `JsonDeserializer.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:
  `getEmptyValue` in class `ReferenceTypeDeserializer<AtomicReference<Object>>`
Throws:
  `JsonMappingException`

#### getAbsentValue

    public Object getAbsentValue(DeserializationContext ctxt)
                          throws JsonMappingException

Let's actually NOT coerce missing Creator parameters into empty value.

Specified by:
  `getAbsentValue` in interface `NullValueProvider`
Overrides:
  `getAbsentValue` in class `JsonDeserializer<AtomicReference<Object>>`
Throws:
  `JsonMappingException`

#### referenceValue

    public AtomicReference<Object> referenceValue(Object contents)

Specified by:
  `referenceValue` in class `ReferenceTypeDeserializer<AtomicReference<Object>>`

#### getReferenced

    public Object getReferenced(AtomicReference<Object> reference)

Description copied from class: `ReferenceTypeDeserializer`
Method 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:
  `getReferenced` in class `ReferenceTypeDeserializer<AtomicReference<Object>>`

#### updateReference

    public AtomicReference<Object> updateReference(AtomicReference<Object> reference,
                                                   Object contents)

Description copied from class: `ReferenceTypeDeserializer`
Method 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:
  `updateReference` in class `ReferenceTypeDeserializer<AtomicReference<Object>>`

#### supportsUpdate

    public Boolean supportsUpdate(DeserializationConfig config)

Description copied from class: `ReferenceTypeDeserializer`
By 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:
  `supportsUpdate` in class `ReferenceTypeDeserializer<AtomicReference<Object>>`