Class AtomicReferenceDeserializer

    • Method Detail

      • getNullValue

        public java.util.concurrent.atomic.AtomicReference<java.lang.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.

        Since version 2.6 (in which the context argument was added), call is expected to be made each and every time a null token needs to be handled.

        Default implementation simply returns null.

        Specified by:
        getNullValue in interface NullValueProvider
        Specified by:
        getNullValue in class ReferenceTypeDeserializer<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:
        referenceValue in class ReferenceTypeDeserializer<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: 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<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: 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<java.util.concurrent.atomic.AtomicReference<java.lang.Object>>
      • supportsUpdate

        public java.lang.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<java.util.concurrent.atomic.AtomicReference<java.lang.Object>>