Top Fields Constructors Methods
tools.jackson.databind.deser.jdk

public Class AtomicReferenceDeserializer

extends ReferenceTypeDeserializer<AtomicReference<Object>>
Class Inheritance
Imports
java.util.concurrent.atomic.AtomicReference, tools.jackson.databind.*, tools.jackson.databind.deser.ValueInstantiator, tools.jackson.databind.deser.std.ReferenceTypeDeserializer, tools.jackson.databind.jsontype.TypeDeserializer

Field Summary

Inherited from tools.jackson.databind.deser.std.ReferenceTypeDeserializer:
_fullType_valueDeserializer_valueInstantiator_valueTypeDeserializer

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Object
getAbsentValue(DeserializationContext ctxt)

Overrides tools.jackson.databind.deser.std.ReferenceTypeDeserializer.getAbsentValue.

Overrides default tools.jackson.databind.deser.NullValueProvider.getAbsentValue.

Method called to determine placeholder value to be used for cases where no value was obtained from input but we must pass a value nonetheless: the common case is that of Creator methods requiring passing a value for every parameter.

public AtomicReference<Object>
getNullValue(DeserializationContext ctxt)

Implements abstract tools.jackson.databind.deser.std.ReferenceTypeDeserializer.getNullValue.

Implements tools.jackson.databind.deser.NullValueProvider.getNullValue.

Method that can be called to determine value to be used for representing null values (values deserialized when JSON token is JsonToken#VALUE_NULL).

public Object
getReferenced(AtomicReference<Object> reference)

Implements abstract tools.jackson.databind.deser.std.ReferenceTypeDeserializer.getReferenced.

Method that may be called to find contents of specified reference, if any; or `null` if none.

public AtomicReference<Object>
public Boolean
supportsUpdate(DeserializationConfig config)

Overrides tools.jackson.databind.deser.std.ReferenceTypeDeserializer.supportsUpdate.

By default we assume that updateability mostly relies on value deserializer; if it supports updates, typically that's what matters.

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

Implements abstract tools.jackson.databind.deser.std.ReferenceTypeDeserializer.updateReference.

Method called in case of "merging update", in which we should try update reference instead of creating a new one.

public AtomicReferenceDeserializer
withResolved(TypeDeserializer typeDeser, ValueDeserializer<?> valueDeser)

Implements abstract tools.jackson.databind.deser.std.ReferenceTypeDeserializer.withResolved.

Mutant factory method called when changes are needed; should construct newly configured instance with new values as indicated.

Inherited from tools.jackson.databind.deser.std.ReferenceTypeDeserializer:
createContextualdeserializedeserializedeserializeWithTypegetEmptyAccessPatterngetEmptyValuegetNullAccessPatterngetValueInstantiatorgetValueTypelogicalType

Constructor Detail

AtomicReferenceDeserializerback to summary
public AtomicReferenceDeserializer(JavaType fullType, ValueInstantiator inst, TypeDeserializer typeDeser, ValueDeserializer<?> deser)

Method Detail

getAbsentValueback to summary
public Object getAbsentValue(DeserializationContext ctxt)

Overrides tools.jackson.databind.deser.std.ReferenceTypeDeserializer.getAbsentValue.

Overrides default tools.jackson.databind.deser.NullValueProvider.getAbsentValue.

Doc from tools.jackson.databind.ValueDeserializer.getAbsentValue.

Method called to determine placeholder value to be used for cases where no value was obtained from input but we must pass a value nonetheless: the common case is that of Creator methods requiring passing a value for every parameter. Usually this is same as getNullValue (which in turn is usually simply Java null), but it can be overridden for specific types: most notable scalar types must use "default" values.

This method needs to be called every time a determination is made.

Default implementation simply calls getNullValue and returns value.

Annotations
@Override
getNullValueback to summary
public AtomicReference<Object> getNullValue(DeserializationContext ctxt)

Implements abstract tools.jackson.databind.deser.std.ReferenceTypeDeserializer.getNullValue.

Implements tools.jackson.databind.deser.NullValueProvider.getNullValue.

Doc from tools.jackson.databind.ValueDeserializer.getNullValue.

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 getNullAccessPattern() returns.

Default implementation simply returns null.

Annotations
@Override
getReferencedback to summary
public Object getReferenced(AtomicReference<Object> reference)

Implements abstract tools.jackson.databind.deser.std.ReferenceTypeDeserializer.getReferenced.

Doc from tools.jackson.databind.deser.std.ReferenceTypeDeserializer.getReferenced.

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.

Annotations
@Override
referenceValueback to summary
public AtomicReference<Object> referenceValue(Object contents)

Implements abstract tools.jackson.databind.deser.std.ReferenceTypeDeserializer.referenceValue.

Annotations
@Override
supportsUpdateback to summary
public Boolean supportsUpdate(DeserializationConfig config)

Overrides tools.jackson.databind.deser.std.ReferenceTypeDeserializer.supportsUpdate.

Doc from tools.jackson.databind.deser.std.ReferenceTypeDeserializer.supportsUpdate.

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.

Annotations
@Override
updateReferenceback to summary
public AtomicReference<Object> updateReference(AtomicReference<Object> reference, Object contents)

Implements abstract tools.jackson.databind.deser.std.ReferenceTypeDeserializer.updateReference.

Doc from tools.jackson.databind.deser.std.ReferenceTypeDeserializer.updateReference.

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.

Annotations
@Override
withResolvedback to summary
public AtomicReferenceDeserializer withResolved(TypeDeserializer typeDeser, ValueDeserializer<?> valueDeser)

Implements abstract tools.jackson.databind.deser.std.ReferenceTypeDeserializer.withResolved.

Doc from tools.jackson.databind.deser.std.ReferenceTypeDeserializer.withResolved.

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.

Annotations
@Override