public abstract class DefaultDeserializationContext extends DeserializationContext implements Serializable
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(com.fasterxml.jackson.databind.DeserializationConfig, com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.InjectableValues)
, with(com.fasterxml.jackson.databind.deser.DeserializerFactory)
)
are left so that custom implementations will properly implement them
to return intended subtype.Modifier and Type | Class and Description |
---|---|
static class |
DefaultDeserializationContext.Impl
Actual full concrete implementation
|
Modifier and Type | Field and Description |
---|---|
protected LinkedHashMap<ObjectIdGenerator.IdKey,ReadableObjectId> |
_objectIds |
_arrayBuilders, _attributes, _cache, _config, _currentType, _dateFormat, _factory, _featureFlags, _injectableValues, _objectBuffer, _parser, _readCapabilities, _view
Modifier | Constructor and Description |
---|---|
protected |
DefaultDeserializationContext(DefaultDeserializationContext src) |
protected |
DefaultDeserializationContext(DefaultDeserializationContext src,
DeserializationConfig config) |
protected |
DefaultDeserializationContext(DefaultDeserializationContext src,
DeserializationConfig config,
JsonParser p,
InjectableValues values) |
protected |
DefaultDeserializationContext(DefaultDeserializationContext src,
DeserializerFactory factory) |
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
|
Modifier and Type | Method and Description |
---|---|
protected Object |
_unwrapAndDeserialize(JsonParser p,
JavaType rootType,
JsonDeserializer<Object> deser,
Object valueToUpdate) |
void |
checkUnresolvedObjectId()
Method called to ensure that every object id encounter during processing
are resolved.
|
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. |
abstract DefaultDeserializationContext |
createDummyInstance(DeserializationConfig config) |
abstract DefaultDeserializationContext |
createInstance(DeserializationConfig config,
JsonParser p,
InjectableValues values)
Method called to create actual usable per-deserialization
context instance.
|
protected ReadableObjectId |
createReadableObjectId(ObjectIdGenerator.IdKey key)
Overridable factory method to create a new instance of ReadableObjectId or its
subclass.
|
JsonDeserializer<Object> |
deserializerInstance(Annotated ann,
Object deserDef) |
ReadableObjectId |
findObjectId(Object id,
ObjectIdGenerator<?> gen,
ObjectIdResolver resolverType)
Method called to find and return entry corresponding to given
Object Id: will add an entry if necessary, and never returns null
|
KeyDeserializer |
keyDeserializerInstance(Annotated ann,
Object deserDef) |
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. |
abstract DefaultDeserializationContext |
with(DeserializerFactory factory)
Fluent factory method used for constructing a blueprint instance
with different factory
|
_getDateFormat, _isCompatible, _shapeForToken, bufferAsCopyOfValue, bufferForInputBuffering, bufferForInputBuffering, canOverrideAccessModifiers, constructCalendar, constructSpecializedType, constructType, endOfInputException, extractScalarFromObject, findClass, findCoercionAction, findCoercionFromBlankString, findContextualValueDeserializer, findInjectableValue, findKeyDeserializer, findNonContextualValueDeserializer, findRootValueDeserializer, getActiveView, getAnnotationIntrospector, getArrayBuilders, getAttribute, getBase64Variant, getConfig, getContextualType, getDateFormat, getDefaultPropertyFormat, getDeserializationFeatures, getFactory, getLocale, getNodeFactory, getParser, getTimeZone, getTypeFactory, handleBadMerge, handleInstantiationProblem, handleMissingInstantiator, handleMissingTypeId, handlePrimaryContextualization, handleSecondaryContextualization, handleUnexpectedToken, handleUnexpectedToken, handleUnexpectedToken, handleUnexpectedToken, handleUnknownProperty, handleUnknownTypeId, handleWeirdKey, handleWeirdNativeValue, handleWeirdNumberValue, handleWeirdStringValue, hasDeserializationFeatures, hasSomeOfFeatures, hasValueDeserializerFor, instantiationException, instantiationException, invalidTypeIdException, isEnabled, isEnabled, isEnabled, leaseObjectBuffer, mappingException, mappingException, mappingException, mappingException, missingTypeIdException, parseDate, readPropertyValue, readPropertyValue, readTree, readTreeAsValue, readTreeAsValue, readValue, readValue, reportBadCoercion, reportBadDefinition, reportBadMerge, reportBadPropertyDefinition, reportBadTypeDefinition, reportInputMismatch, reportInputMismatch, reportInputMismatch, reportInputMismatch, reportMappingException, reportMissingContent, reportPropertyInputMismatch, reportPropertyInputMismatch, reportTrailingTokens, reportUnknownProperty, reportUnresolvedObjectId, reportWrongTokenException, reportWrongTokenException, reportWrongTokenException, reportWrongTokenException, returnObjectBuffer, setAttribute, unknownTypeException, weirdKeyException, weirdNativeValueException, weirdNumberException, weirdStringException, wrongTokenException, wrongTokenException, wrongTokenException
_colonConcat, _desc, _format, _quotedString, _throwNotASubtype, _throwSubtypeClassNotAllowed, _throwSubtypeNameNotAllowed, _truncate, constructType, converterInstance, objectIdGeneratorInstance, objectIdResolverInstance, reportBadDefinition, resolveAndValidateSubType, resolveSubType
protected transient LinkedHashMap<ObjectIdGenerator.IdKey,ReadableObjectId> _objectIds
protected DefaultDeserializationContext(DeserializerFactory df, DeserializerCache cache)
protected DefaultDeserializationContext(DefaultDeserializationContext src, DeserializationConfig config, JsonParser p, InjectableValues values)
protected DefaultDeserializationContext(DefaultDeserializationContext src, DeserializationConfig config)
protected DefaultDeserializationContext(DefaultDeserializationContext src, DeserializerFactory factory)
protected DefaultDeserializationContext(DefaultDeserializationContext src)
public DefaultDeserializationContext copy()
ObjectMapper.copy()
will work
properly; specifically, that caches are cleared, but settings
will otherwise remain identical; and that no sharing of state
occurs.public ReadableObjectId findObjectId(Object id, ObjectIdGenerator<?> gen, ObjectIdResolver resolverType)
DeserializationContext
findObjectId
in class DeserializationContext
protected ReadableObjectId createReadableObjectId(ObjectIdGenerator.IdKey key)
tryToResolveUnresolvedObjectId(com.fasterxml.jackson.databind.deser.impl.ReadableObjectId)
.
Default implementation simply constructs default ReadableObjectId
with
given key
.key
- The key to associate with the new ReadableObjectIdpublic void checkUnresolvedObjectId() throws UnresolvedForwardReference
DeserializationContext
checkUnresolvedObjectId
in class DeserializationContext
UnresolvedForwardReference
protected boolean tryToResolveUnresolvedObjectId(ReadableObjectId roid)
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(com.fasterxml.jackson.databind.DeserializationContext)
and
returns whatever it returns.
public JsonDeserializer<Object> deserializerInstance(Annotated ann, Object deserDef) throws JsonMappingException
deserializerInstance
in class DeserializationContext
JsonMappingException
public final KeyDeserializer keyDeserializerInstance(Annotated ann, Object deserDef) throws JsonMappingException
keyDeserializerInstance
in class DeserializationContext
JsonMappingException
public abstract DefaultDeserializationContext with(DeserializerFactory factory)
public abstract DefaultDeserializationContext createInstance(DeserializationConfig config, JsonParser p, InjectableValues values)
public abstract DefaultDeserializationContext createDummyInstance(DeserializationConfig config)
public Object readRootValue(JsonParser p, JavaType valueType, JsonDeserializer<Object> deser, Object valueToUpdate) throws IOException
IOException
protected Object _unwrapAndDeserialize(JsonParser p, JavaType rootType, JsonDeserializer<Object> deser, Object valueToUpdate) throws IOException
IOException
Copyright © 2008–2021 FasterXML. All rights reserved.