Top Description Fields Constructors Methods
tools.jackson.databind.cfg

public final Class BaseSettings

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Imports
java.text.DateFormat, java.util.Locale, .TimeZone, tools.jackson.core.Base64Variant, tools.jackson.databind.*, tools.jackson.databind.introspect.AccessorNamingStrategy, .AnnotationIntrospectorPair, tools.jackson.databind.jsontype.PolymorphicTypeValidator, .TypeResolverBuilder, tools.jackson.databind.node.JsonNodeFactory, tools.jackson.databind.util.StdDateFormat

Immutable container class used to store simple configuration settings for both serialization and deserialization. Since instances are fully immutable, instances can be freely shared and used without synchronization.

Field Summary

Modifier and TypeField and Description
protected final AccessorNamingStrategy.Provider
_accessorNaming

Provider for creating AccessorNamingStrategy instances to use

protected final AnnotationIntrospector
_annotationIntrospector

Introspector used for accessing annotation value based configuration.

protected final CacheProvider
_cacheProvider

Used to provide custom cache implementation in downstream components.

protected final ConstructorDetector
_ctorDetector

Handler that specifies some aspects of Constructor auto-detection.

protected final DateFormat
_dateFormat

Custom date format to use for deserialization.

protected final Base64Variant
_defaultBase64

Explicitly default Base64Variant to use for handling binary data (byte[]), used with data formats that use base64 encoding (like JSON, CSV).

protected final TypeResolverBuilder<?>
_defaultTyper

Type information handler used for "default typing".

protected final EnumNamingStrategy
_enumNamingStrategy

Custom enum naming strategy in use, if any.

protected final HandlerInstantiator
_handlerInstantiator

Object used for creating instances of handlers (serializers, deserializers, type and type id resolvers), given class to instantiate.

protected final Locale
_locale

Default java.util.Locale used with serialization formats.

protected final JsonNodeFactory
_nodeFactory

Factory used for constructing tools.jackson.databind.JsonNode instances.

protected final PropertyNamingStrategy
_propertyNamingStrategy

Custom property naming strategy in use, if any.

protected final TimeZone
_timeZone

Default java.util.TimeZone used with serialization formats, if (and only if!) explicitly set by use; otherwise `null` to indicate "use default", which means "UTC" (from Jackson 2.7); earlier versions (up to 2.6) used "GMT".

protected final PolymorphicTypeValidator
_typeValidator

Validator that is used to limit allowed subtypes during polymorphic deserialization, mostly for security reasons when dealing with untrusted content.

private static final TimeZone
DEFAULT_TIMEZONE

We will use a default TimeZone as the baseline.

private static final long

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private DateFormat
public AccessorNamingStrategy.Provider
public AnnotationIntrospector
public Base64Variant
public CacheProvider
public ConstructorDetector
public DateFormat
public TypeResolverBuilder<?>
public EnumNamingStrategy
public HandlerInstantiator
public Locale
public JsonNodeFactory
public PolymorphicTypeValidator
public PropertyNamingStrategy
public TimeZone
public boolean
hasExplicitTimeZone()

Accessor that may be called to determine whether this settings object has been explicitly configured with a TimeZone (true), or is still relying on the default settings (false).

public BaseSettings
public BaseSettings
public BaseSettings
public BaseSettings
public BaseSettings
public BaseSettings
public BaseSettings
public BaseSettings
public BaseSettings
with(TimeZone tz)

Fluent factory for constructing a new instance that uses specified TimeZone.

public BaseSettings
public BaseSettings

Returns:

a new instance with provided CacheProvider.
with
(CacheProvider cacheProvider)

Fluent factory for constructing a new instance with provided CacheProvider.

public BaseSettings
with(JsonNodeFactory nodeFactory)

public BaseSettings
with(ConstructorDetector ctorDetector)

public BaseSettings
public BaseSettings
public BaseSettings
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_accessorNamingback to summary
protected final AccessorNamingStrategy.Provider _accessorNaming

Provider for creating AccessorNamingStrategy instances to use

_annotationIntrospectorback to summary
protected final AnnotationIntrospector _annotationIntrospector

Introspector used for accessing annotation value based configuration.

_cacheProviderback to summary
protected final CacheProvider _cacheProvider

Used to provide custom cache implementation in downstream components.

_ctorDetectorback to summary
protected final ConstructorDetector _ctorDetector

Handler that specifies some aspects of Constructor auto-detection.

_dateFormatback to summary
protected final DateFormat _dateFormat

Custom date format to use for deserialization. If specified, will be used instead of tools.jackson.databind.util.StdDateFormat.

Note that the configured format object will be cloned once per deserialization process (first time it is needed)

_defaultBase64back to summary
protected final Base64Variant _defaultBase64

Explicitly default Base64Variant to use for handling binary data (byte[]), used with data formats that use base64 encoding (like JSON, CSV).

_defaultTyperback to summary
protected final TypeResolverBuilder<?> _defaultTyper

Type information handler used for "default typing".

_enumNamingStrategyback to summary
protected final EnumNamingStrategy _enumNamingStrategy

Custom enum naming strategy in use, if any.

_handlerInstantiatorback to summary
protected final HandlerInstantiator _handlerInstantiator

Object used for creating instances of handlers (serializers, deserializers, type and type id resolvers), given class to instantiate. This is typically used to do additional configuration (with dependency injection, for example) beyond simply construction of instances; or to use alternative constructors.

_localeback to summary
protected final Locale _locale

Default java.util.Locale used with serialization formats. Default value is Locale#getDefault().

_nodeFactoryback to summary
protected final JsonNodeFactory _nodeFactory

Factory used for constructing tools.jackson.databind.JsonNode instances.

_propertyNamingStrategyback to summary
protected final PropertyNamingStrategy _propertyNamingStrategy

Custom property naming strategy in use, if any.

_timeZoneback to summary
protected final TimeZone _timeZone

Default java.util.TimeZone used with serialization formats, if (and only if!) explicitly set by use; otherwise `null` to indicate "use default", which means "UTC" (from Jackson 2.7); earlier versions (up to 2.6) used "GMT".

Note that if a new value is set, timezone is also assigned to _dateFormat of this object.

_typeValidatorback to summary
protected final PolymorphicTypeValidator _typeValidator

Validator that is used to limit allowed subtypes during polymorphic deserialization, mostly for security reasons when dealing with untrusted content.

DEFAULT_TIMEZONEback to summary
private static final TimeZone DEFAULT_TIMEZONE

We will use a default TimeZone as the baseline.

serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

BaseSettingsback to summary
public BaseSettings(AnnotationIntrospector ai, PropertyNamingStrategy pns, EnumNamingStrategy ens, AccessorNamingStrategy.Provider accNaming, TypeResolverBuilder<?> defaultTyper, PolymorphicTypeValidator ptv, DateFormat dateFormat, HandlerInstantiator hi, Locale locale, TimeZone tz, Base64Variant defaultBase64, CacheProvider cacheProvider, JsonNodeFactory nodeFactory, ConstructorDetector ctorDetector)

Method Detail

_forceback to summary
private DateFormat _force(DateFormat df, TimeZone tz)
getAccessorNamingback to summary
public AccessorNamingStrategy.Provider getAccessorNaming()
getAnnotationIntrospectorback to summary
public AnnotationIntrospector getAnnotationIntrospector()
getBase64Variantback to summary
public Base64Variant getBase64Variant()
getCacheProviderback to summary
public CacheProvider getCacheProvider()
getConstructorDetectorback to summary
public ConstructorDetector getConstructorDetector()
getDateFormatback to summary
public DateFormat getDateFormat()
getDefaultTyperback to summary
public TypeResolverBuilder<?> getDefaultTyper()
getEnumNamingStrategyback to summary
public EnumNamingStrategy getEnumNamingStrategy()
getHandlerInstantiatorback to summary
public HandlerInstantiator getHandlerInstantiator()
getLocaleback to summary
public Locale getLocale()
getNodeFactoryback to summary
public JsonNodeFactory getNodeFactory()
getPolymorphicTypeValidatorback to summary
public PolymorphicTypeValidator getPolymorphicTypeValidator()
getPropertyNamingStrategyback to summary
public PropertyNamingStrategy getPropertyNamingStrategy()
getTimeZoneback to summary
public TimeZone getTimeZone()
hasExplicitTimeZoneback to summary
public boolean hasExplicitTimeZone()

Accessor that may be called to determine whether this settings object has been explicitly configured with a TimeZone (true), or is still relying on the default settings (false).

withback to summary
public BaseSettings with(PropertyNamingStrategy pns)
withback to summary
public BaseSettings with(EnumNamingStrategy ens)
withback to summary
public BaseSettings with(AccessorNamingStrategy.Provider p)
withback to summary
public BaseSettings with(TypeResolverBuilder<?> typer)
withback to summary
public BaseSettings with(PolymorphicTypeValidator ptv)
withback to summary
public BaseSettings with(DateFormat df)
withback to summary
public BaseSettings with(HandlerInstantiator hi)
withback to summary
public BaseSettings with(Locale l)
withback to summary
public BaseSettings with(TimeZone tz)

Fluent factory for constructing a new instance that uses specified TimeZone. Note that timezone used with also be assigned to configured DateFormat, changing time formatting defaults.

withback to summary
public BaseSettings with(Base64Variant base64)
withback to summary
public BaseSettings with(CacheProvider cacheProvider)

Fluent factory for constructing a new instance with provided CacheProvider.

Returns:BaseSettings

a new instance with provided CacheProvider.

withback to summary
public BaseSettings with(JsonNodeFactory nodeFactory)
withback to summary
public BaseSettings with(ConstructorDetector ctorDetector)
withAnnotationIntrospectorback to summary
public BaseSettings withAnnotationIntrospector(AnnotationIntrospector ai)
withAppendedAnnotationIntrospectorback to summary
public BaseSettings withAppendedAnnotationIntrospector(AnnotationIntrospector ai)
withInsertedAnnotationIntrospectorback to summary
public BaseSettings withInsertedAnnotationIntrospector(AnnotationIntrospector ai)