java.lang.Object
tools.jackson.databind.DatabindContext
tools.jackson.databind.DeserializationContext
tools.jackson.databind.deser.DeserializationContextExt
- All Implemented Interfaces:
ObjectReadContext
- Direct Known Subclasses:
DeserializationContextExt.Impl
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.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classActual full concrete implementationNested classes/interfaces inherited from interface tools.jackson.core.ObjectReadContext
ObjectReadContext.Base -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected LinkedHashMap<ObjectIdGenerator.IdKey,ReadableObjectId> Fields inherited from class tools.jackson.databind.DeserializationContext
_activeView, _arrayBuilders, _attributes, _cache, _classIntrospector, _config, _currentType, _dateFormat, _delegateBindDepth, _factory, _featureFlags, _injectableValues, _objectBuffer, _parser, _readCapabilities, _schema, _streamFactory -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDeserializationContextExt(TokenStreamFactory tsf, DeserializerFactory deserializerFactory, DeserializerCache cache, DeserializationConfig config, FormatSchema schema, InjectableValues values) 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 -
Method Summary
Modifier and TypeMethodDescriptionprotected Object_unwrapAndDeserialize(JsonParser p, JavaType rootType, ValueDeserializer<Object> deser, Object valueToUpdate) voidaddPendingForwardRef(Object container) Method to register that a forward Object Id reference has been recorded against the given container object (typically a builder).voidMethod called to ensure that every object id encounter during processing are resolved.protected ReadableObjectIdOverridable factory method to create a new instance of ReadableObjectId or its subclass.deserializerInstance(Annotated ann, Object deserDef) 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 nullbooleanhasPendingForwardRefsFor(Object builder) Method for checking whether the given container object has any pending unresolved forward Object Id references registered against it.final KeyDeserializerkeyDeserializerInstance(Annotated ann, Object deserDef) readRootValue(JsonParser p, JavaType valueType, ValueDeserializer<Object> deser, Object valueToUpdate) voidremovePendingForwardRef(Object container) Method to remove a container object from the pending forward reference tracking set, called when the forward reference has been resolved.protected booleanOverridable helper method called to try to resolve otherwise unresolvableReadableObjectId; and if this succeeds, returntrueto indicate problem has been resolved in some way, so that caller can avoid reporting it as an error.voidupdateObjectId(Object delegate, Object newItem) Method called to update Object Id binding from an intermediate delegate object to the final bean produced by a delegating@JsonCreator.Methods inherited from class tools.jackson.databind.DeserializationContext
_getDateFormat, _isCompatible, _shapeForToken, bufferAsCopyOfValue, bufferForInputBuffering, bufferForInputBuffering, canOverrideAccessModifiers, classIntrospector, constructCalendar, constructSpecializedType, constructType, createArrayNode, createObjectNode, enterDelegateBindPending, exitDelegateBindPending, extractScalarFromObject, findClass, findCoercionAction, findCoercionFromBlankString, findContextualValueDeserializer, findInjectableValue, findKeyDeserializer, findNonContextualValueDeserializer, findPropertyContentTypeDeserializer, findPropertyTypeDeserializer, findRootName, findRootName, findRootValueDeserializer, findTypeDeserializer, findTypeDeserializer, flushCachedDeserializers, getActiveView, getAnnotationIntrospector, getArrayBuilders, getAttribute, getBase64Variant, getConfig, getContextualType, getDatatypeFeatures, getDefaultPropertyFormat, getDeserializationFeatures, getFormatReadFeatures, getLocale, getNodeFactory, getParser, getSchema, getStreamReadFeatures, getTimeZone, getTypeFactory, handleBadMerge, handleInstantiationProblem, handleMissingInstantiator, handleMissingTypeId, handleNullForPrimitives, handlePrimaryContextualization, handleSecondaryContextualization, handleUnexpectedToken, handleUnexpectedToken, handleUnexpectedToken, handleUnknownProperty, handleUnknownTypeId, handleWeirdKey, handleWeirdNativeValue, handleWeirdNumberValue, handleWeirdStringValue, hasDeserializationFeatures, hasExplicitDeserializerFor, hasSomeOfFeatures, instantiationException, instantiationException, introspectBeanDescription, introspectBeanDescriptionForBuilder, introspectBeanDescriptionForCreation, introspectBeanDescriptionForCreation, invalidTypeIdException, isDelegateBindPending, isEnabled, isEnabled, isEnabled, isEnabled, lazyIntrospectBeanDescriptionForBuilder, lazyIntrospectBeanDescriptionForCreation, leaseObjectBuffer, missingInjectableValueException, missingTypeIdException, parseDate, readPropertyValue, readPropertyValue, readTree, readTreeAsValue, readTreeAsValue, readValue, readValue, readValue, readValue, reportBadCoercion, reportBadDefinition, reportBadPropertyDefinition, reportBadPropertyDefinition, reportBadTypeDefinition, reportInputMismatch, reportInputMismatch, reportInputMismatch, reportInputMismatch, reportPropertyInputMismatch, reportPropertyInputMismatch, reportTrailingTokens, reportUnresolvedObjectId, reportWrongTokenException, reportWrongTokenException, reportWrongTokenException, returnObjectBuffer, setAttribute, streamReadConstraints, tokenStreamFactory, weirdKeyException, weirdNativeValueException, weirdNumberException, weirdStringException, wrongTokenException, wrongTokenExceptionMethods inherited from class tools.jackson.databind.DatabindContext
_colonConcat, _desc, _format, _quotedString, _throwNotASubtype, _throwSubtypeClassNotAllowed, _throwSubtypeNameNotAllowed, _truncate, canonicalizeString, constructType, converterInstance, introspectBeanDescription, introspectClassAnnotations, introspectClassAnnotations, introspectDirectClassAnnotations, isAnnotationProcessingEnabled, lazyIntrospectBeanDescription, objectIdGeneratorInstance, objectIdResolverInstance, reportBadDefinition, reportBadTypeDefinition, resolveAndValidateSubType, resolveSubTypeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface tools.jackson.core.ObjectReadContext
createParser, createParser, createParser, createParser, createParser, treeAsTokens
-
Field Details
-
_objectIds
-
-
Constructor Details
-
DeserializationContextExt
protected DeserializationContextExt(TokenStreamFactory tsf, DeserializerFactory deserializerFactory, DeserializerCache cache, DeserializationConfig config, FormatSchema schema, InjectableValues values) 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
-
-
Method Details
-
assignParser
-
assignAndReturnParser
-
findObjectId
public ReadableObjectId findObjectId(Object id, ObjectIdGenerator<?> gen, ObjectIdResolver resolverType) Description copied from class:DeserializationContextMethod called to find and return entry corresponding to given Object Id: will add an entry if necessary, and never returns null- Specified by:
findObjectIdin classDeserializationContext
-
createReadableObjectId
Overridable factory method to create a new instance of ReadableObjectId or its subclass. It is meant to be overridden when custom ReadableObjectId is needed fortryToResolveUnresolvedObjectId(tools.jackson.databind.deser.ReadableObjectId). Default implementation simply constructs defaultReadableObjectIdwith givenkey.- Parameters:
key- The key to associate with the new ReadableObjectId- Returns:
- New ReadableObjectId instance
-
updateObjectId
Description copied from class:DeserializationContextMethod called to update Object Id binding from an intermediate delegate object to the final bean produced by a delegating@JsonCreator. This is needed because when using@JsonIdentityInfowith delegating creators, the Object Id gets initially bound to the delegate (intermediate) object, but needs to point to the final converted bean.Implemented by
DeserializationContextExt.- Specified by:
updateObjectIdin classDeserializationContext- Parameters:
delegate- The intermediate delegate object that was originally boundnewItem- The final bean produced by the delegating creator- Throws:
JacksonException
-
addPendingForwardRef
Description copied from class:DeserializationContextMethod to register that a forward Object Id reference has been recorded against the given container object (typically a builder). Called byObjectIdReferencePropertywhen an unresolved forward reference is caught. Enables O(1) checking viaDeserializationContext.hasPendingForwardRefsFor(java.lang.Object).Implemented by
DeserializationContextExt.- Specified by:
addPendingForwardRefin classDeserializationContext- Parameters:
container- The container/builder object the forward ref was registered against
-
removePendingForwardRef
Description copied from class:DeserializationContextMethod to remove a container object from the pending forward reference tracking set, called when the forward reference has been resolved.Implemented by
DeserializationContextExt.- Specified by:
removePendingForwardRefin classDeserializationContext- Parameters:
container- The container/builder object to remove
-
hasPendingForwardRefsFor
Description copied from class:DeserializationContextMethod for checking whether the given container object has any pending unresolved forward Object Id references registered against it. Used by Builder-based deserialization to detect forward references that would be lost after building (since they point to the builder, not the built object).Implemented by
DeserializationContextExt.- Specified by:
hasPendingForwardRefsForin classDeserializationContext- Parameters:
builder- The builder/container object to check- Returns:
trueif there are pending forward references against this object
-
checkUnresolvedObjectId
Description copied from class:DeserializationContextMethod called to ensure that every object id encounter during processing are resolved.- Specified by:
checkUnresolvedObjectIdin classDeserializationContext- Throws:
UnresolvedForwardReference
-
tryToResolveUnresolvedObjectId
Overridable helper method called to try to resolve otherwise unresolvableReadableObjectId; and if this succeeds, returntrueto indicate problem has been resolved in some way, so that caller can avoid reporting it as an error.Default implementation simply calls
ReadableObjectId.tryToResolveUnresolved(tools.jackson.databind.DeserializationContext)and returns whatever it returns. -
deserializerInstance
- Specified by:
deserializerInstancein classDeserializationContext
-
keyDeserializerInstance
- Specified by:
keyDeserializerInstancein classDeserializationContext
-
readRootValue
public Object readRootValue(JsonParser p, JavaType valueType, ValueDeserializer<Object> deser, Object valueToUpdate) throws JacksonException - Throws:
JacksonException
-
_unwrapAndDeserialize
protected Object _unwrapAndDeserialize(JsonParser p, JavaType rootType, ValueDeserializer<Object> deser, Object valueToUpdate) throws JacksonException - Throws:
JacksonException
-