java.lang.Object
tools.jackson.databind.cfg.DeserializationContexts
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
DeserializationContexts.DefaultImpl
Factory/builder class that replaces Jackson 2.x concept of "blueprint" instance
of
DeserializationContext. It will be constructed and configured during
ObjectMapper building phase, and will be called once per readValue
call to construct actual stateful DeserializationContext to use during
serialization.
Note that since this object has to be serializable (to allow JDK serialization of
mapper instances), DeserializationContext need not be serializable any more.
- Since:
- 3.0
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final DeserializerCacheCache for doing type-to-value-serializer lookups.protected final DeserializerFactoryFactory responsible for constructing standard serializers.protected final TokenStreamFactoryLow-levelTokenStreamFactorythat may be used for constructing embedded generators. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedDeserializationContexts(TokenStreamFactory tsf, DeserializerFactory deserializerFactory, DeserializerCache cache) -
Method Summary
Modifier and TypeMethodDescriptionabstract DeserializationContextExtcreateContext(DeserializationConfig config, FormatSchema schema, InjectableValues injectables) Factory method for constructing context object for individualwriteValuecall.voidMethod that will drop all dynamically constructed deserializers (ones that are counted as result value forDeserializerCache.cachedDeserializersCount()).protected abstract DeserializationContextsforMapper(Object mapper, TokenStreamFactory tsf, DeserializerFactory deserializerFactory, DeserializerCache cache) forMapper(Object mapper, DeserializationConfig config, TokenStreamFactory tsf, DeserializerFactory deserializerFactory) Mutant factory method called when instance is actually created for use by mapper (as opposed to coming into existence during building, module registration).
-
Field Details
-
_streamFactory
Low-levelTokenStreamFactorythat may be used for constructing embedded generators. -
_deserializerFactory
Factory responsible for constructing standard serializers. -
_cache
Cache for doing type-to-value-serializer lookups.
-
-
Constructor Details
-
DeserializationContexts
protected DeserializationContexts() -
DeserializationContexts
protected DeserializationContexts(TokenStreamFactory tsf, DeserializerFactory deserializerFactory, DeserializerCache cache)
-
-
Method Details
-
forMapper
public DeserializationContexts forMapper(Object mapper, DeserializationConfig config, TokenStreamFactory tsf, DeserializerFactory deserializerFactory) Mutant factory method called when instance is actually created for use by mapper (as opposed to coming into existence during building, module registration). Necessary usually to initialize non-configuration state, such as caching. -
forMapper
protected abstract DeserializationContexts forMapper(Object mapper, TokenStreamFactory tsf, DeserializerFactory deserializerFactory, DeserializerCache cache) -
createContext
public abstract DeserializationContextExt createContext(DeserializationConfig config, FormatSchema schema, InjectableValues injectables) Factory method for constructing context object for individualwriteValuecall. -
flushCachedDeserializers
public void flushCachedDeserializers()Method that will drop all dynamically constructed deserializers (ones that are counted as result value forDeserializerCache.cachedDeserializersCount()).
-