MapperFeature.
Small part of implementation is included here by aggregating
BaseSettings instance that contains configuration
that is shared between different types of instances.
| Modifier and Type | Field and Description |
|---|---|
| protected final BaseSettings | _base
Immutable container object for simple configuration settings. |
| protected final long | _mapperFeatures
Set of shared mapper features enabled. |
| protected static final JsonFormat. | |
| protected static final JsonInclude. | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| protected | |
| protected | |
| protected | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public final boolean | Returns: True if access modifier overriding is allowed (and may be done for any Field, Method, Constructor or Class); false to prevent any attempts to override.Accessor for determining whether it is ok to try to force override of access modifiers to be able to get or set values of non-public Methods, Fields; to invoke non-public Constructors, Methods; or to instantiate non-public Classes. |
| public static <F extends Enum | collectFeatureDefaults(Class<F> enumClass)
Method that calculates bit set (flags) of all features that are enabled by default. |
| public SerializableString | Returns: Optimized text object constructedText to represent src)Method for constructing a specialized textual object that can typically
be serialized faster than basic |
| public JavaType | |
| public final JavaType | |
| public final JavaType | constructType(TypeReference<?> valueTypeRef)
Helper method that will construct
getTypeFactory().constructType(valueTypeRef);
|
| public abstract ConfigOverride | Returns: Override object to use for the type, if defined; null if none.Accessor for finding |
| public abstract PropertyName | |
| public abstract PropertyName | |
| public final AccessorNamingStrategy. | |
| public abstract Class | |
| public AnnotationIntrospector | getAnnotationIntrospector()
Method for getting |
| public abstract ContextAttributes | getAttributes()
Method for accessing per-instance shared (baseline/default) attribute values; these are used as the basis for per-call attributes. |
| public Base64Variant | getBase64Variant()
Method called during deserialization if Base64 encoded content needs to be decoded. |
| public CacheProvider | |
| public ClassIntrospector | |
| public abstract ConfigOverride | Returns: Override object to use for the type, never null (but may be empty)Accessor for finding |
| public abstract ConstructorDetector | |
| public abstract DatatypeFeatures | |
| public final DateFormat | getDateFormat()
Method for accessing currently configured (textual) date format that will be used for reading or writing date values (in case of writing, only if textual output is configured; not if dates are to be serialized as time stamps). |
| public abstract JsonInclude. | getDefaultInclusion(Class<?>
Type of the instance containing the targeted property. baseType, Class<?> Type of the property to look up inclusion setting for. propertyType)Accessor for default property inclusion to use for serialization, considering possible per-type override for given base type and possible per-type override for given property type. |
| public JsonInclude. | getDefaultInclusion(Class<?>
Type of the instance containing the targeted property. baseType, Class<?> Type of the property to look up inclusion setting for. propertyType, JsonInclude.Inclusion setting to return if no overrides found. defaultInclAccessor for default property inclusion to use for serialization,
considering possible per-type override for given base type and
possible per-type override for given property type; but
if none found, returning given |
| public abstract Boolean | Returns: Global base settings, if any; `null` if none.Accessor for the baseline merge info used as the global baseline, not considering possible per-type overrides. |
| public abstract Boolean | Returns: Type-specific settings (if any); global defaults (same asgetDefaultMergeable()) otherwise, if any defined; or `null`
if neither definedAccessor for the baseline merge info used for given type, including global defaults if no type-specific overrides defined. |
| public abstract JsonFormat. | getDefaultPropertyFormat(Class<?> baseType)
Accessor for default format settings to use for serialization (and, to a degree deserialization), considering baseline settings and per-type defaults for given base type (if any). |
| public abstract JsonIgnoreProperties. | getDefaultPropertyIgnorals(Class<?> baseType)
Accessor for default property ignorals to use, if any, for given base type,
based on config overrides settings (see |
| public abstract JsonIgnoreProperties. | getDefaultPropertyIgnorals(Class<?> baseType, AnnotatedClass actualClass)
Helper method that may be called to see if there are property ignoral
definitions from annotations (via |
| public abstract JsonInclude. | getDefaultPropertyInclusion()
Accessor for default property inclusion to use for serialization, used unless overridden by per-type or per-property overrides. |
| public abstract JsonInclude. | getDefaultPropertyInclusion(Class<?> baseType)
Accessor for default property inclusion to use for serialization, considering possible per-type override for given base type. |
| public JsonInclude. | getDefaultPropertyInclusion(Class<?> baseType, JsonInclude.
Inclusion setting to return if no overrides found. defaultInclAccessor for default property inclusion to use for serialization,
considering possible per-type override for given base type; but
if none found, returning given |
| public abstract JsonIncludeProperties. | getDefaultPropertyInclusions(Class<?> baseType, AnnotatedClass actualClass)
Helper method that may be called to see if there are property inclusion
definitions from annotations (via |
| public abstract JsonSetter. | Returns: Global base settings; never nullAccessor for the baseline setter info used as the global baseline, not considering possible per-type overrides. |
| public final TypeResolverBuilder | getDefaultTyper(JavaType baseType)
Method called to locate a type info handler for types that do not have one explicitly declared via annotations (or other configuration). |
| public abstract VisibilityChecker | getDefaultVisibilityChecker()
Accessor for object used for determining whether specific property elements (method, constructors, fields) can be auto-detected based on their visibility (access modifiers). |
| public abstract VisibilityChecker | getDefaultVisibilityChecker(Class<?> baseType, AnnotatedClass actualClass)
Accessor for object used for determining whether specific property elements (method, constructors, fields) can be auto-detected based on their visibility (access modifiers). |
| public final HandlerInstantiator | |
| public final Locale | getLocale()
Method for accessing the default |
| public PolymorphicTypeValidator | getPolymorphicTypeValidator()
Simple accessor for default |
| public final PropertyNamingStrategy | |
| public abstract SubtypeResolver | |
| public final TimeZone | getTimeZone()
Method for accessing the default |
| public final TypeFactory | |
| public boolean | Returns: true if this configuration has explicitly specified
java., or false if it uses the default
time zoneMethod for checking whether a |
| public final boolean | hasMapperFeatures(int featureMask)
Deprecated
Since 2.13 -- no replacement
"Bulk" access method for checking that all features specified by mask are enabled. |
| public BeanDescription | introspectClassAnnotations(Class<?> cls)
Accessor for getting bean description that only contains class annotations: useful if no getter/setter/creator information is needed. |
| public BeanDescription | introspectClassAnnotations(JavaType type)
Accessor for getting bean description that only contains class annotations: useful if no getter/setter/creator information is needed. |
| public BeanDescription | introspectDirectClassAnnotations(Class<?> cls)
Accessor for getting bean description that only contains immediate class annotations: ones from the class, and its direct mix-in, if any, but not from super types. |
| public final BeanDescription | introspectDirectClassAnnotations(JavaType type)
Accessor for getting bean description that only contains immediate class annotations: ones from the class, and its direct mix-in, if any, but not from super types. |
| public final boolean | Returns: True if annotation processing is enabled; false if notMethod for determining whether annotation processing is enabled or not (default settings are typically that it is enabled; must explicitly disable). |
| public final boolean | isEnabled(MapperFeature f)
Accessor for simple mapper features (which are shared for serialization, deserialization) |
| public abstract boolean | Returns: True if feature is enabled; false otherwiseFeature to check feature)Accessor for checking whether give |
| public final boolean | shouldSortPropertiesAlphabetically()
Accessor for checking whether default settings for property handling indicate that properties should be alphabetically ordered or not. |
| public TypeIdResolver | typeIdResolverInstance(Annotated annotated, Class<? extends TypeIdResolver> resolverClass)
Method that can be called to obtain an instance of |
| public TypeResolverBuilder | typeResolverBuilderInstance(Annotated annotated, Class<? extends TypeResolverBuilder<?>> builderClass)
Method that can be called to obtain an instance of |
| public abstract 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. |
| public abstract T | with(MapperFeature... features)
Method for constructing and returning a new instance with specified mapper features enabled. |
| public abstract T | |
| public abstract T | without(MapperFeature... features)
Method for constructing and returning a new instance with specified mapper features disabled. |
| _base | back to summary |
|---|---|
| protected final BaseSettings _base Immutable container object for simple configuration settings. | |
| _mapperFeatures | back to summary |
|---|---|
| protected final long _mapperFeatures Set of shared mapper features enabled. Note changed from | |
| EMPTY_FORMAT | back to summary |
|---|---|
protected static final JsonFormat.
| |
| EMPTY_INCLUDE | back to summary |
|---|---|
protected static final JsonInclude.
| |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| MapperConfig | back to summary |
|---|---|
| protected MapperConfig(BaseSettings base, long mapperFeatures) | |
| MapperConfig | back to summary |
|---|---|
| protected MapperConfig(MapperConfig<T> src, long mapperFeatures) | |
| MapperConfig | back to summary |
|---|---|
| protected MapperConfig(MapperConfig<T> src, BaseSettings base) | |
| MapperConfig | back to summary |
|---|---|
| protected MapperConfig(MapperConfig<T> src) | |
| canOverrideAccessModifiers | back to summary |
|---|---|
| public final boolean canOverrideAccessModifiers() Accessor for determining whether it is ok to try to force override of access modifiers to be able to get or set values of non-public Methods, Fields; to invoke non-public Constructors, Methods; or to instantiate non-public Classes. By default this is enabled, but on some platforms it needs to be prevented since if this would violate security constraints and cause failures.
| |
| collectFeatureDefaults | back to summary |
|---|---|
| public static <F extends Enum Method that calculates bit set (flags) of all features that are enabled by default. | |
| compileString | back to summary |
|---|---|
| public SerializableString compileString(String src) Method for constructing a specialized textual object that can typically
be serialized faster than basic
| |
| constructSpecializedType | back to summary |
|---|---|
| public JavaType constructSpecializedType(JavaType baseType, Class<?> subclass) | |
| constructType | back to summary |
|---|---|
| public final JavaType constructType(Class<?> cls) Helper method that will construct
getTypeFactory().constructType(cls);
| |
| constructType | back to summary |
|---|---|
| public final JavaType constructType(TypeReference<?> valueTypeRef) Helper method that will construct
getTypeFactory().constructType(valueTypeRef);
| |
| findConfigOverride | back to summary |
|---|---|
| public abstract ConfigOverride findConfigOverride(Class<?> type) Accessor for finding Note that only directly associated override is found; no type hierarchy traversal is performed.
| |
| findRootName | back to summary |
|---|---|
public abstract PropertyName findRootName(JavaType rootType)
| |
| findRootName | back to summary |
|---|---|
public abstract PropertyName findRootName(Class<?> rawRootType)
| |
| getAccessorNaming | back to summary |
|---|---|
| public final AccessorNamingStrategy. | |
| getActiveView | back to summary |
|---|---|
| public abstract Class Accessor for finding currently active view, if any (null if none) | |
| getAnnotationIntrospector | back to summary |
|---|---|
| public AnnotationIntrospector getAnnotationIntrospector() Method for getting Non-final since it is actually overridden by sub-classes (for now?) | |
| getAttributes | back to summary |
|---|---|
| public abstract ContextAttributes getAttributes() Method for accessing per-instance shared (baseline/default) attribute values; these are used as the basis for per-call attributes.
| |
| getBase64Variant | back to summary |
|---|---|
| public Base64Variant getBase64Variant() Method called during deserialization if Base64 encoded content
needs to be decoded. Default version just returns default Jackson
uses, which is modified-mime which does not add linefeeds (because
those would have to be escaped in JSON strings); but this can
be configured on | |
| getCacheProvider | back to summary |
|---|---|
public CacheProvider getCacheProvider()
| |
| getClassIntrospector | back to summary |
|---|---|
| public ClassIntrospector getClassIntrospector() | |
| getConfigOverride | back to summary |
|---|---|
| public abstract ConfigOverride getConfigOverride(Class<?> type) Accessor for finding Note that only directly associated override is found; no type hierarchy traversal is performed.
| |
| getConstructorDetector | back to summary |
|---|---|
public abstract ConstructorDetector getConstructorDetector()
| |
| getDatatypeFeatures | back to summary |
|---|---|
public abstract DatatypeFeatures getDatatypeFeatures()
| |
| getDateFormat | back to summary |
|---|---|
| public final DateFormat getDateFormat() Method for accessing currently configured (textual) date format that will be used for reading or writing date values (in case of writing, only if textual output is configured; not if dates are to be serialized as time stamps).
Note that typically
This method is usually only called by framework itself, since there
are convenience methods available via
| |
| getDefaultInclusion | back to summary |
|---|---|
| public abstract JsonInclude. Accessor for default property inclusion to use for serialization,
considering possible per-type override for given base type and
possible per-type override for given property type. Note if no override found, defaults to value returned by
| |
| getDefaultInclusion | back to summary |
|---|---|
| public JsonInclude. Accessor for default property inclusion to use for serialization,
considering possible per-type override for given base type and
possible per-type override for given property type; but
if none found, returning given
| |
| getDefaultMergeable | back to summary |
|---|---|
| public abstract Boolean getDefaultMergeable() Accessor for the baseline merge info used as the global baseline, not considering possible per-type overrides.
| |
| getDefaultMergeable | back to summary |
|---|---|
| public abstract Boolean getDefaultMergeable(Class<?> baseType) Accessor for the baseline merge info used for given type, including global defaults if no type-specific overrides defined.
| |
| getDefaultPropertyFormat | back to summary |
|---|---|
| public abstract JsonFormat. Accessor for default format settings to use for serialization (and, to a degree deserialization), considering baseline settings and per-type defaults for given base type (if any).
| |
| getDefaultPropertyIgnorals | back to summary |
|---|---|
| public abstract JsonIgnoreProperties. Accessor for default property ignorals to use, if any, for given base type,
based on config overrides settings (see
| |
| getDefaultPropertyIgnorals | back to summary |
|---|---|
| public abstract JsonIgnoreProperties. Helper method that may be called to see if there are property ignoral
definitions from annotations (via
| |
| getDefaultPropertyInclusion | back to summary |
|---|---|
| public abstract JsonInclude. Accessor for default property inclusion to use for serialization, used unless overridden by per-type or per-property overrides.
| |
| getDefaultPropertyInclusion | back to summary |
|---|---|
| public abstract JsonInclude. Accessor for default property inclusion to use for serialization,
considering possible per-type override for given base type. Note if no override found, defaults to value returned by
| |
| getDefaultPropertyInclusion | back to summary |
|---|---|
| public JsonInclude. Accessor for default property inclusion to use for serialization,
considering possible per-type override for given base type; but
if none found, returning given
| |
| getDefaultPropertyInclusions | back to summary |
|---|---|
| public abstract JsonIncludeProperties. Helper method that may be called to see if there are property inclusion
definitions from annotations (via Todo config override.
| |
| getDefaultSetterInfo | back to summary |
|---|---|
| public abstract JsonSetter. Accessor for the baseline setter info used as the global baseline, not considering possible per-type overrides.
| |
| getDefaultTyper | back to summary |
|---|---|
| public final TypeResolverBuilder Method called to locate a type info handler for types that do not have one explicitly declared via annotations (or other configuration). If such default handler is configured, it is returned; otherwise null is returned. | |
| getDefaultVisibilityChecker | back to summary |
|---|---|
| public abstract VisibilityChecker Accessor for object used for determining whether specific property elements
(method, constructors, fields) can be auto-detected based on
their visibility (access modifiers). Can be changed to allow
different minimum visibility levels for auto-detection. Note
that this is the global handler; individual types (classes)
can further override active checker used (using
| |
| getDefaultVisibilityChecker | back to summary |
|---|---|
| public abstract VisibilityChecker Accessor for object used for determining whether specific property elements
(method, constructors, fields) can be auto-detected based on
their visibility (access modifiers). This is based on global defaults
(as would be returned by
| |
| getHandlerInstantiator | back to summary |
|---|---|
| public final HandlerInstantiator getHandlerInstantiator() | |
| getLocale | back to summary |
|---|---|
| public final Locale getLocale() Method for accessing the default | |
| getPolymorphicTypeValidator | back to summary |
|---|---|
| public PolymorphicTypeValidator getPolymorphicTypeValidator() Simple accessor for default
Since 2.11 will also check
| |
| getPropertyNamingStrategy | back to summary |
|---|---|
| public final PropertyNamingStrategy getPropertyNamingStrategy() | |
| getSubtypeResolver | back to summary |
|---|---|
| public abstract SubtypeResolver getSubtypeResolver() | |
| getTimeZone | back to summary |
|---|---|
| public final TimeZone getTimeZone() Method for accessing the default | |
| getTypeFactory | back to summary |
|---|---|
| public final TypeFactory getTypeFactory() | |
| hasExplicitTimeZone | back to summary |
|---|---|
| public boolean hasExplicitTimeZone() Method for checking whether a
| |
| hasMapperFeatures | back to summary |
|---|---|
| public final boolean hasMapperFeatures(int featureMask)
Deprecated Since 2.13 -- no replacement "Bulk" access method for checking that all features specified by mask are enabled.
| |
| introspectClassAnnotations | back to summary |
|---|---|
| public BeanDescription introspectClassAnnotations(Class<?> cls) Accessor for getting bean description that only contains class annotations: useful if no getter/setter/creator information is needed. | |
| introspectClassAnnotations | back to summary |
|---|---|
| public BeanDescription introspectClassAnnotations(JavaType type) Accessor for getting bean description that only contains class annotations: useful if no getter/setter/creator information is needed. | |
| introspectDirectClassAnnotations | back to summary |
|---|---|
| public BeanDescription introspectDirectClassAnnotations(Class<?> cls) Accessor for getting bean description that only contains immediate class annotations: ones from the class, and its direct mix-in, if any, but not from super types. | |
| introspectDirectClassAnnotations | back to summary |
|---|---|
| public final BeanDescription introspectDirectClassAnnotations(JavaType type) Accessor for getting bean description that only contains immediate class annotations: ones from the class, and its direct mix-in, if any, but not from super types. | |
| isAnnotationProcessingEnabled | back to summary |
|---|---|
| public final boolean isAnnotationProcessingEnabled() Method for determining whether annotation processing is enabled or not (default settings are typically that it is enabled; must explicitly disable).
| |
| isEnabled | back to summary |
|---|---|
| public final boolean isEnabled(MapperFeature f) Accessor for simple mapper features (which are shared for serialization, deserialization) | |
| isEnabled | back to summary |
|---|---|
| public abstract boolean isEnabled(DatatypeFeature feature) Accessor for checking whether give
| |
| shouldSortPropertiesAlphabetically | back to summary |
|---|---|
| public final boolean shouldSortPropertiesAlphabetically() Accessor for checking whether default settings for property handling indicate that properties should be alphabetically ordered or not. | |
| typeIdResolverInstance | back to summary |
|---|---|
| public TypeIdResolver typeIdResolverInstance(Annotated annotated, Class<? extends TypeIdResolver> resolverClass) Method that can be called to obtain an instance of | |
| typeResolverBuilderInstance | back to summary |
|---|---|
| public TypeResolverBuilder Method that can be called to obtain an instance of | |
| useRootWrapping | back to summary |
|---|---|
| public abstract 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. | |
| with | back to summary |
|---|---|
| public abstract T with(MapperFeature... features) Method for constructing and returning a new instance with specified mapper features enabled. | |
| with | back to summary |
|---|---|
public abstract T with(MapperFeature feature, boolean state)
| |
| without | back to summary |
|---|---|
| public abstract T without(MapperFeature... features) Method for constructing and returning a new instance with specified mapper features disabled. | |