Top Description Inners Fields Constructors Methods
com.fasterxml.jackson.databind.deser

public abstract Class DefaultDeserializationContext

extends DeserializationContext
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Known Direct Subclasses
com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.Impl
Imports
java.io.IOException, java.util.*, .Map.Entry, com.fasterxml.jackson.annotation.ObjectIdGenerator, .ObjectIdResolver, .ObjectIdGenerator.IdKey, com.fasterxml.jackson.core.JsonParser, .JsonToken, com.fasterxml.jackson.databind.*, com.fasterxml.jackson.databind.cfg.CacheProvider, .HandlerInstantiator, com.fasterxml.jackson.databind.deser.impl.ReadableObjectId, .ReadableObjectId.Referring, com.fasterxml.jackson.databind.introspect.Annotated, com.fasterxml.jackson.databind.util.ClassUtil

Complete DeserializationContext implementation that adds extended API for ObjectMapper (and ObjectReader) to call, as well as implements certain parts that base class has left abstract. The remaining abstract methods (createInstance, with) are left so that custom implementations will properly implement them to return intended subtype.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
DefaultDeserializationContext.Impl

Actual full concrete implementation

Field Summary

Modifier and TypeField and Description
private List<ObjectIdResolver>
protected transient LinkedHashMap<ObjectIdGenerator.IdKey, ReadableObjectId>
private static final long
Inherited from com.fasterxml.jackson.databind.DeserializationContext:
_arrayBuilders_attributes_cache_config_currentType_dateFormat_factory_featureFlags_injectableValues_objectBuffer_parser_readCapabilities_view

Constructor Summary

AccessConstructor and Description
protected
DefaultDeserializationContext(DeserializerFactory df, DeserializerCache cache)

Constructor that will pass specified deserializer factory and cache: cache may be null (in which case default implementation will be used), factory cannot be null

protected
protected
protected
protected
protected

Method Summary

Modifier and TypeMethod and Description
protected Object
public void
checkUnresolvedObjectId()

Implements abstract com.fasterxml.jackson.databind.DeserializationContext.checkUnresolvedObjectId.

Method called to ensure that every object id encounter during processing are resolved.

public DefaultDeserializationContext
copy()

Method needed to ensure that ObjectMapper#copy will work properly; specifically, that caches are cleared, but settings will otherwise remain identical; and that no sharing of state occurs.

public abstract DefaultDeserializationContext
public abstract DefaultDeserializationContext
createInstance(DeserializationConfig config, JsonParser p, InjectableValues values)

Method called to create actual usable per-deserialization context instance.

protected ReadableObjectId

Returns:

New ReadableObjectId instance
createReadableObjectId
(ObjectIdGenerator.IdKey
The key to associate with the new ReadableObjectId
key
)

Overridable factory method to create a new instance of ReadableObjectId or its subclass.

public JsonDeserializer<Object>
public ReadableObjectId
findObjectId(Object id, ObjectIdGenerator<?> gen, ObjectIdResolver resolverType)

Implements abstract com.fasterxml.jackson.databind.DeserializationContext.findObjectId.

Method called to find and return entry corresponding to given Object Id: will add an entry if necessary, and never returns null

public final KeyDeserializer
public Object
readRootValue(JsonParser p, JavaType valueType, JsonDeserializer<Object> deser, Object valueToUpdate)

protected boolean
tryToResolveUnresolvedObjectId(ReadableObjectId roid)

Overridable helper method called to try to resolve otherwise unresolvable ReadableObjectId; and if this succeeds, return true to indicate problem has been resolved in some way, so that caller can avoid reporting it as an error.

public abstract DefaultDeserializationContext
with(DeserializerFactory factory)

Fluent factory method used for constructing a blueprint instance with different factory

public abstract DefaultDeserializationContext
withCaches(CacheProvider cacheProvider)

Fluent factory method used for constructing a new instance with cache instances provided by CacheProvider.

Inherited from com.fasterxml.jackson.databind.DeserializationContext:
_getDateFormat_isCompatible_shapeForTokenbufferAsCopyOfValuebufferForInputBufferingbufferForInputBufferingcanOverrideAccessModifiersconstructCalendarconstructSpecializedTypeconstructTypeextractScalarFromObjectfindClassfindCoercionActionfindCoercionFromBlankStringfindContextualValueDeserializerfindInjectableValuefindKeyDeserializerfindNonContextualValueDeserializerfindRootValueDeserializergetActiveViewgetAnnotationIntrospectorgetArrayBuildersgetAttributegetBase64VariantgetConfiggetContextualTypegetDatatypeFeaturesgetDefaultPropertyFormatgetDeserializationFeaturesgetFactorygetLocalegetNodeFactorygetParsergetTimeZonegetTypeFactoryhandleBadMergehandleInstantiationProblemhandleMissingInstantiatorhandleMissingTypeIdhandlePrimaryContextualizationhandleSecondaryContextualizationhandleUnexpectedTokenhandleUnexpectedTokenhandleUnexpectedTokenhandleUnexpectedTokenhandleUnknownPropertyhandleUnknownTypeIdhandleWeirdKeyhandleWeirdNativeValuehandleWeirdNumberValuehandleWeirdStringValuehasDeserializationFeatureshasSomeOfFeatureshasValueDeserializerForinstantiationExceptioninstantiationExceptioninvalidTypeIdExceptionisEnabledisEnabledisEnabledisEnabledleaseObjectBuffermissingTypeIdExceptionparseDatereadPropertyValuereadPropertyValuereadTreereadTreeAsValuereadTreeAsValuereadValuereadValuereportBadCoercionreportBadDefinitionreportBadPropertyDefinitionreportBadTypeDefinitionreportInputMismatchreportInputMismatchreportInputMismatchreportInputMismatchreportPropertyInputMismatchreportPropertyInputMismatchreportTrailingTokensreportUnresolvedObjectIdreportWrongTokenExceptionreportWrongTokenExceptionreportWrongTokenExceptionreturnObjectBuffersetAttributeweirdKeyExceptionweirdNativeValueExceptionweirdNumberExceptionweirdStringExceptionwrongTokenExceptionwrongTokenException

Field Detail

_objectIdResolversback to summary
private List<ObjectIdResolver> _objectIdResolvers
_objectIdsback to summary
protected transient LinkedHashMap<ObjectIdGenerator.IdKey, ReadableObjectId> _objectIds
serialVersionUIDback to summary
private static final long serialVersionUID

Hides com.fasterxml.jackson.databind.DeserializationContext.serialVersionUID.

Constructor Detail

DefaultDeserializationContextback to summary
protected DefaultDeserializationContext(DeserializerFactory df, DeserializerCache cache)

Constructor that will pass specified deserializer factory and cache: cache may be null (in which case default implementation will be used), factory cannot be null

DefaultDeserializationContextback to summary
protected DefaultDeserializationContext(DefaultDeserializationContext src, DeserializationConfig config, JsonParser p, InjectableValues values)
DefaultDeserializationContextback to summary
protected DefaultDeserializationContext(DefaultDeserializationContext src, DeserializationConfig config)
DefaultDeserializationContextback to summary
protected DefaultDeserializationContext(DefaultDeserializationContext src, DeserializerFactory factory)
DefaultDeserializationContextback to summary
protected DefaultDeserializationContext(DefaultDeserializationContext src)

Copy-constructor

Since
2.4.4
DefaultDeserializationContextback to summary
protected DefaultDeserializationContext(DefaultDeserializationContext src, CacheProvider cp)
Since
2.16

Method Detail

_unwrapAndDeserializeback to summary
protected Object _unwrapAndDeserialize(JsonParser p, JavaType rootType, JsonDeserializer<Object> deser, Object valueToUpdate) throws IOException
checkUnresolvedObjectIdback to summary
public void checkUnresolvedObjectId() throws UnresolvedForwardReference

Implements abstract com.fasterxml.jackson.databind.DeserializationContext.checkUnresolvedObjectId.

Doc from com.fasterxml.jackson.databind.DeserializationContext.checkUnresolvedObjectId.

Method called to ensure that every object id encounter during processing are resolved.

Annotations
@Override
copyback to summary
public DefaultDeserializationContext copy()

Method needed to ensure that ObjectMapper#copy will work properly; specifically, that caches are cleared, but settings will otherwise remain identical; and that no sharing of state occurs.

Since
2.4.4
createDummyInstanceback to summary
public abstract DefaultDeserializationContext createDummyInstance(DeserializationConfig config)
createInstanceback to summary
public abstract DefaultDeserializationContext createInstance(DeserializationConfig config, JsonParser p, InjectableValues values)

Method called to create actual usable per-deserialization context instance.

createReadableObjectIdback to summary
protected ReadableObjectId createReadableObjectId(ObjectIdGenerator.IdKey key)

Overridable factory method to create a new instance of ReadableObjectId or its subclass. It is meant to be overridden when custom ReadableObjectId is needed for tryToResolveUnresolvedObjectId. Default implementation simply constructs default ReadableObjectId with given key.

Parameters
key:ObjectIdGenerator.IdKey

The key to associate with the new ReadableObjectId

Returns:ReadableObjectId

New ReadableObjectId instance

Since
2.7
deserializerInstanceback to summary
public JsonDeserializer<Object> deserializerInstance(Annotated ann, Object deserDef) throws JsonMappingException

Implements abstract com.fasterxml.jackson.databind.DeserializationContext.deserializerInstance.

Annotations
@SuppressWarnings:unchecked
@Override
findObjectIdback to summary
public ReadableObjectId findObjectId(Object id, ObjectIdGenerator<?> gen, ObjectIdResolver resolverType)

Implements abstract com.fasterxml.jackson.databind.DeserializationContext.findObjectId.

Doc from com.fasterxml.jackson.databind.DeserializationContext.findObjectId.

Method called to find and return entry corresponding to given Object Id: will add an entry if necessary, and never returns null

Annotations
@Override
keyDeserializerInstanceback to summary
public final KeyDeserializer keyDeserializerInstance(Annotated ann, Object deserDef) throws JsonMappingException

Implements abstract com.fasterxml.jackson.databind.DeserializationContext.keyDeserializerInstance.

Annotations
@Override
readRootValueback to summary
public Object readRootValue(JsonParser p, JavaType valueType, JsonDeserializer<Object> deser, Object valueToUpdate) throws IOException
tryToResolveUnresolvedObjectIdback to summary
protected boolean tryToResolveUnresolvedObjectId(ReadableObjectId roid)

Overridable helper method called to try to resolve otherwise unresolvable ReadableObjectId; and if this succeeds, return true to indicate problem has been resolved in some way, so that caller can avoid reporting it as an error.

Default implementation simply calls ReadableObjectId#tryToResolveUnresolved and returns whatever it returns.

Since
2.6
withback to summary
public abstract DefaultDeserializationContext with(DeserializerFactory factory)

Fluent factory method used for constructing a blueprint instance with different factory

withCachesback to summary
public abstract DefaultDeserializationContext withCaches(CacheProvider cacheProvider)

Fluent factory method used for constructing a new instance with cache instances provided by CacheProvider.

Since
2.16
com.fasterxml.jackson.databind.deser back to summary

public final Class DefaultDeserializationContext.Impl

extends DefaultDeserializationContext
Class Inheritance

Actual full concrete implementation

Field Summary

Modifier and TypeField and Description
private static final long
Inherited from com.fasterxml.jackson.databind.deser.DefaultDeserializationContext:
_objectIds

Constructor Summary

AccessConstructor and Description
public
Impl(DeserializerFactory df)

Default constructor for a blueprint object, which will use the standard DeserializerCache, given factory.

private
private
private
private
private

Method Summary

Modifier and TypeMethod and Description
public DefaultDeserializationContext
copy()

Overrides com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.copy.

Method needed to ensure that ObjectMapper#copy will work properly; specifically, that caches are cleared, but settings will otherwise remain identical; and that no sharing of state occurs.

public DefaultDeserializationContext
public DefaultDeserializationContext
createInstance(DeserializationConfig config, JsonParser p, InjectableValues values)

Implements abstract com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.createInstance.

Method called to create actual usable per-deserialization context instance.

public DefaultDeserializationContext
with(DeserializerFactory factory)

Implements abstract com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.with.

Fluent factory method used for constructing a blueprint instance with different factory

public DefaultDeserializationContext
withCaches(CacheProvider cp)

Implements abstract com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.withCaches.

Fluent factory method used for constructing a new instance with cache instances provided by CacheProvider.

Inherited from com.fasterxml.jackson.databind.deser.DefaultDeserializationContext:
_unwrapAndDeserializecheckUnresolvedObjectIdcreateReadableObjectIddeserializerInstancefindObjectIdkeyDeserializerInstancereadRootValuetryToResolveUnresolvedObjectId

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.serialVersionUID.

Constructor Detail

Implback to summary
public Impl(DeserializerFactory df)

Default constructor for a blueprint object, which will use the standard DeserializerCache, given factory.

Implback to summary
private Impl(DefaultDeserializationContext.Impl src, DeserializationConfig config, JsonParser p, InjectableValues values)
Implback to summary
private Impl(DefaultDeserializationContext.Impl src)
Implback to summary
private Impl(DefaultDeserializationContext.Impl src, DeserializerFactory factory)
Implback to summary
private Impl(DefaultDeserializationContext.Impl src, DeserializationConfig config)
Implback to summary
private Impl(DefaultDeserializationContext.Impl src, CacheProvider cp)
Since
2.16

Method Detail

copyback to summary
public DefaultDeserializationContext copy()

Overrides com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.copy.

Doc from com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.copy.

Method needed to ensure that ObjectMapper#copy will work properly; specifically, that caches are cleared, but settings will otherwise remain identical; and that no sharing of state occurs.

Annotations
@Override
createDummyInstanceback to summary
public DefaultDeserializationContext createDummyInstance(DeserializationConfig config)

Implements abstract com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.createDummyInstance.

Annotations
@Override
createInstanceback to summary
public DefaultDeserializationContext createInstance(DeserializationConfig config, JsonParser p, InjectableValues values)

Implements abstract com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.createInstance.

Doc from com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.createInstance.

Method called to create actual usable per-deserialization context instance.

Annotations
@Override
withback to summary
public DefaultDeserializationContext with(DeserializerFactory factory)

Implements abstract com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.with.

Doc from com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.with.

Fluent factory method used for constructing a blueprint instance with different factory

Annotations
@Override
withCachesback to summary
public DefaultDeserializationContext withCaches(CacheProvider cp)

Implements abstract com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.withCaches.

Doc from com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.withCaches.

Fluent factory method used for constructing a new instance with cache instances provided by CacheProvider.

Annotations
@Override