Class DefaultDeserializationContext
java.lang.Object
com.fasterxml.jackson.databind.DatabindContext
com.fasterxml.jackson.databind.DeserializationContext
com.fasterxml.jackson.databind.deser.DefaultDeserializationContext
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
DefaultDeserializationContext.Impl,XmlDeserializationContext
public abstract class DefaultDeserializationContext
extends DeserializationContext
implements Serializable
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(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.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classActual full concrete implementation -
Method Summary
Modifier and TypeMethodDescriptionvoidMethod called to ensure that every object id encounter during processing are resolved.copy()Method needed to ensure thatObjectMapper.copy()will work properly; specifically, that caches are cleared, but settings will otherwise remain identical; and that no sharing of state occurs.abstract DefaultDeserializationContextabstract DefaultDeserializationContextcreateInstance(DeserializationConfig config, JsonParser p, InjectableValues values) Method called to create actual usable per-deserialization context instance.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 nullfinal KeyDeserializerkeyDeserializerInstance(Annotated ann, Object deserDef) readRootValue(JsonParser p, JavaType valueType, JsonDeserializer<Object> deser, Object valueToUpdate) abstract DefaultDeserializationContextwith(DeserializerFactory factory) Fluent factory method used for constructing a blueprint instance with different factoryabstract DefaultDeserializationContextwithCaches(CacheProvider cacheProvider) Fluent factory method used for constructing a new instance with cache instances provided byCacheProvider.Methods inherited from class com.fasterxml.jackson.databind.DeserializationContext
bufferAsCopyOfValue, bufferForInputBuffering, bufferForInputBuffering, canOverrideAccessModifiers, constructCalendar, constructSpecializedType, constructType, extractScalarFromObject, findClass, findCoercionAction, findCoercionFromBlankString, findContextualValueDeserializer, findInjectableValue, findKeyDeserializer, findNonContextualValueDeserializer, findRootValueDeserializer, getActiveView, getAnnotationIntrospector, getArrayBuilders, getAttribute, getBase64Variant, getConfig, getContextualType, getDatatypeFeatures, 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, isEnabled, leaseObjectBuffer, missingTypeIdException, parseDate, readPropertyValue, readPropertyValue, readTree, readTreeAsValue, readTreeAsValue, readValue, readValue, reportBadCoercion, reportBadDefinition, reportBadPropertyDefinition, reportBadTypeDefinition, reportInputMismatch, reportInputMismatch, reportInputMismatch, reportInputMismatch, reportPropertyInputMismatch, reportPropertyInputMismatch, reportTrailingTokens, reportUnresolvedObjectId, reportWrongTokenException, reportWrongTokenException, reportWrongTokenException, returnObjectBuffer, setAttribute, weirdKeyException, weirdNativeValueException, weirdNumberException, weirdStringException, wrongTokenException, wrongTokenExceptionMethods inherited from class com.fasterxml.jackson.databind.DatabindContext
constructType, converterInstance, objectIdGeneratorInstance, objectIdResolverInstance, reportBadDefinition, resolveAndValidateSubType, resolveSubType
-
Method Details
-
copy
Method needed to ensure thatObjectMapper.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
-
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
-
checkUnresolvedObjectId
Description copied from class:DeserializationContextMethod called to ensure that every object id encounter during processing are resolved.- Specified by:
checkUnresolvedObjectIdin classDeserializationContext- Throws:
UnresolvedForwardReference
-
deserializerInstance
public JsonDeserializer<Object> deserializerInstance(Annotated ann, Object deserDef) throws JsonMappingException - Specified by:
deserializerInstancein classDeserializationContext- Throws:
JsonMappingException
-
keyDeserializerInstance
public final KeyDeserializer keyDeserializerInstance(Annotated ann, Object deserDef) throws JsonMappingException - Specified by:
keyDeserializerInstancein classDeserializationContext- Throws:
JsonMappingException
-
with
Fluent factory method used for constructing a blueprint instance with different factory -
withCaches
Fluent factory method used for constructing a new instance with cache instances provided byCacheProvider.- Since:
- 2.16
-
createInstance
public abstract DefaultDeserializationContext createInstance(DeserializationConfig config, JsonParser p, InjectableValues values) Method called to create actual usable per-deserialization context instance. -
createDummyInstance
-
readRootValue
public Object readRootValue(JsonParser p, JavaType valueType, JsonDeserializer<Object> deser, Object valueToUpdate) throws IOException - Throws:
IOException
-