public final class DeserializationConfig extends MapperConfigBase<DeserializationFeature,DeserializationConfig> implements java.io.Serializable
ObjectMapper
, which
passes an immutable instance to be used for deserialization process.
Note that instances are considered immutable and as such no copies should need to be created for sharing; all copying is done with "fluent factory" methods.
Constructor and Description |
---|
DeserializationConfig(BaseSettings base,
SubtypeResolver str,
SimpleMixInResolver mixins,
RootNameLookup rootNames,
ConfigOverrides configOverrides)
Constructor used by ObjectMapper to create default configuration object instance.
|
Modifier and Type | Method and Description |
---|---|
TypeDeserializer |
findTypeDeserializer(JavaType baseType)
Helper method that is needed to properly handle polymorphic referenced
types, such as types referenced by
AtomicReference ,
or various "optional" types. |
int |
getDeserializationFeatures()
Bulk access method for getting the bit mask of all
DeserializationFeature s
that are enabled. |
JsonNodeFactory |
getNodeFactory() |
LinkedNode<DeserializationProblemHandler> |
getProblemHandlers()
Method for getting head of the problem handler chain.
|
boolean |
hasDeserializationFeatures(int featureMask)
Bulk access method for checking that all features specified by
mask are enabled.
|
boolean |
hasSomeOfFeatures(int featureMask)
Bulk access method for checking that at least one of features specified by
mask is enabled.
|
void |
initialize(JsonParser p)
Method called by
ObjectMapper and ObjectReader
to modify those JsonParser.Feature settings
that have been configured via this config instance. |
<T extends BeanDescription> |
introspect(JavaType type)
Method that will introspect full bean properties for the purpose
of building a bean deserializer
|
<T extends BeanDescription> |
introspectForBuilder(JavaType type) |
<T extends BeanDescription> |
introspectForCreation(JavaType type)
Method that will introspect subset of bean properties needed to
construct bean instance.
|
boolean |
isEnabled(DeserializationFeature f) |
boolean |
isEnabled(JsonParser.Feature f,
JsonFactory factory) |
boolean |
requiresFullValue()
Convenience method equivalant to:
isEnabled(DeserializationFeature.FAIL_ON_TRAILING_TOKENS)
|
boolean |
useRootWrapping()
Accessor for checking whether configuration indicates that
"root wrapping" (use of an extra property/name pair at root level)
is expected or not.
|
DeserializationConfig |
with(ContextAttributes attrs)
Method for constructing an instance that has specified
contextual attributes.
|
DeserializationConfig |
with(DeserializationFeature feature)
Fluent factory method that will construct and return a new configuration
object instance with specified features enabled.
|
DeserializationConfig |
with(DeserializationFeature first,
DeserializationFeature... features)
Fluent factory method that will construct and return a new configuration
object instance with specified features enabled.
|
DeserializationConfig |
with(FormatFeature feature)
Fluent factory method that will construct and return a new configuration
object instance with specified features enabled.
|
DeserializationConfig |
with(JsonNodeFactory f)
Fluent factory method that will construct a new instance with
specified
JsonNodeFactory |
DeserializationConfig |
with(JsonParser.Feature feature)
Fluent factory method that will construct and return a new configuration
object instance with specified features enabled.
|
DeserializationConfig |
with(SubtypeResolver str)
Method for constructing and returning a new instance with different
SubtypeResolver
to use. |
DeserializationConfig |
withFeatures(DeserializationFeature... features)
Fluent factory method that will construct and return a new configuration
object instance with specified features enabled.
|
DeserializationConfig |
withFeatures(FormatFeature... features)
Fluent factory method that will construct and return a new configuration
object instance with specified features enabled.
|
DeserializationConfig |
withFeatures(JsonParser.Feature... features)
Fluent factory method that will construct and return a new configuration
object instance with specified features enabled.
|
DeserializationConfig |
withHandler(DeserializationProblemHandler h)
Method that can be used to add a handler that can (try to)
resolve non-fatal deserialization problems.
|
DeserializationConfig |
withNoProblemHandlers()
Method for removing all configured problem handlers; usually done to replace
existing handler(s) with different one(s)
|
DeserializationConfig |
without(DeserializationFeature feature)
Fluent factory method that will construct and return a new configuration
object instance with specified feature disabled.
|
DeserializationConfig |
without(DeserializationFeature first,
DeserializationFeature... features)
Fluent factory method that will construct and return a new configuration
object instance with specified features disabled.
|
DeserializationConfig |
without(FormatFeature feature)
Fluent factory method that will construct and return a new configuration
object instance with specified feature disabled.
|
DeserializationConfig |
without(JsonParser.Feature feature)
Fluent factory method that will construct and return a new configuration
object instance with specified feature disabled.
|
DeserializationConfig |
withoutFeatures(DeserializationFeature... features)
Fluent factory method that will construct and return a new configuration
object instance with specified features disabled.
|
DeserializationConfig |
withoutFeatures(FormatFeature... features)
Fluent factory method that will construct and return a new configuration
object instance with specified features disabled.
|
DeserializationConfig |
withoutFeatures(JsonParser.Feature... features)
Fluent factory method that will construct and return a new configuration
object instance with specified features disabled.
|
DeserializationConfig |
withRootName(PropertyName rootName)
Method for constructing and returning a new instance with different
root name to use (none, if null).
|
DeserializationConfig |
withView(java.lang.Class<?> view)
Method for constructing and returning a new instance with different
view to use.
|
copy, findConfigOverride, findMixInClassFor, findRootName, findRootName, getActiveView, getAttributes, getConfigOverride, getDefaultInclusion, getDefaultMergeable, getDefaultMergeable, getDefaultPropertyFormat, getDefaultPropertyIgnorals, getDefaultPropertyIgnorals, getDefaultPropertyInclusion, getDefaultPropertyInclusion, getDefaultSetterInfo, getDefaultVisibilityChecker, getDefaultVisibilityChecker, getFullRootName, getRootName, getSubtypeResolver, mixInCount, with, with, with, with, with, with, with, with, with, with, with, with, withAppendedAnnotationIntrospector, withAttribute, withAttributes, withInsertedAnnotationIntrospector, without, withoutAttribute, withRootName
canOverrideAccessModifiers, collectFeatureDefaults, compileString, constructSpecializedType, constructType, constructType, getAnnotationIntrospector, getBase64Variant, getClassIntrospector, getDateFormat, getDefaultInclusion, getDefaultPropertyInclusion, getDefaultTyper, getHandlerInstantiator, getLocale, getPropertyNamingStrategy, getTimeZone, getTypeFactory, hasMapperFeatures, introspectClassAnnotations, introspectClassAnnotations, introspectDirectClassAnnotations, introspectDirectClassAnnotations, isAnnotationProcessingEnabled, isEnabled, shouldSortPropertiesAlphabetically, typeIdResolverInstance, typeResolverBuilderInstance
public DeserializationConfig(BaseSettings base, SubtypeResolver str, SimpleMixInResolver mixins, RootNameLookup rootNames, ConfigOverrides configOverrides)
public DeserializationConfig with(SubtypeResolver str)
MapperConfigBase
SubtypeResolver
to use.
NOTE: make sure to register new instance with ObjectMapper
if directly calling this method.
with
in class MapperConfigBase<DeserializationFeature,DeserializationConfig>
public DeserializationConfig withRootName(PropertyName rootName)
MapperConfigBase
Note that when a root name is set to a non-Empty String, this will automatically force use
of root element wrapping with given name. If empty String passed, will
disable root name wrapping; and if null used, will instead use
SerializationFeature
to determine if to use wrapping, and annotation
(or default name) for actual root name to use.
withRootName
in class MapperConfigBase<DeserializationFeature,DeserializationConfig>
rootName
- to use: if null, means "use default" (clear setting);
if empty String ("") means that no root name wrapping is used;
otherwise defines root name to use.public DeserializationConfig withView(java.lang.Class<?> view)
MapperConfigBase
withView
in class MapperConfigBase<DeserializationFeature,DeserializationConfig>
public DeserializationConfig with(ContextAttributes attrs)
MapperConfigBase
with
in class MapperConfigBase<DeserializationFeature,DeserializationConfig>
public DeserializationConfig with(DeserializationFeature feature)
public DeserializationConfig with(DeserializationFeature first, DeserializationFeature... features)
public DeserializationConfig withFeatures(DeserializationFeature... features)
public DeserializationConfig without(DeserializationFeature feature)
public DeserializationConfig without(DeserializationFeature first, DeserializationFeature... features)
public DeserializationConfig withoutFeatures(DeserializationFeature... features)
public DeserializationConfig with(JsonParser.Feature feature)
public DeserializationConfig withFeatures(JsonParser.Feature... features)
public DeserializationConfig without(JsonParser.Feature feature)
public DeserializationConfig withoutFeatures(JsonParser.Feature... features)
public DeserializationConfig with(FormatFeature feature)
public DeserializationConfig withFeatures(FormatFeature... features)
public DeserializationConfig without(FormatFeature feature)
public DeserializationConfig withoutFeatures(FormatFeature... features)
public DeserializationConfig with(JsonNodeFactory f)
JsonNodeFactory
public DeserializationConfig withHandler(DeserializationProblemHandler h)
public DeserializationConfig withNoProblemHandlers()
public void initialize(JsonParser p)
ObjectMapper
and ObjectReader
to modify those JsonParser.Feature
settings
that have been configured via this config instance.public boolean useRootWrapping()
MapperConfig
useRootWrapping
in class MapperConfig<DeserializationConfig>
public final boolean isEnabled(DeserializationFeature f)
public final boolean isEnabled(JsonParser.Feature f, JsonFactory factory)
public final boolean hasDeserializationFeatures(int featureMask)
public final boolean hasSomeOfFeatures(int featureMask)
public final int getDeserializationFeatures()
DeserializationFeature
s
that are enabled.public final boolean requiresFullValue()
isEnabled(DeserializationFeature.FAIL_ON_TRAILING_TOKENS)
public LinkedNode<DeserializationProblemHandler> getProblemHandlers()
public final JsonNodeFactory getNodeFactory()
public <T extends BeanDescription> T introspect(JavaType type)
type
- Type of class to be introspectedpublic <T extends BeanDescription> T introspectForCreation(JavaType type)
public <T extends BeanDescription> T introspectForBuilder(JavaType type)
public TypeDeserializer findTypeDeserializer(JavaType baseType) throws JsonMappingException
AtomicReference
,
or various "optional" types.JsonMappingException
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"