Class BaseSettings
java.lang.Object
edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.databind.cfg.BaseSettings
- All Implemented Interfaces:
Serializable
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.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected final AccessorNamingStrategy.Provider
Provider for creatingAccessorNamingStrategy
instances to useprotected final AnnotationIntrospector
Introspector used for accessing annotation value based configuration.protected final ClassIntrospector
Introspector used to figure out Bean properties needed for bean serialization and deserialization.protected final DateFormat
Custom date format to use for deserialization.protected final Base64Variant
Explicitly defaultBase64Variant
to use for handling binary data (byte[]
), used with data formats that use base64 encoding (like JSON, CSV).protected final HandlerInstantiator
Object used for creating instances of handlers (serializers, deserializers, type and type id resolvers), given class to instantiate.protected final Locale
DefaultLocale
used with serialization formats.protected final PropertyNamingStrategy
Custom property naming strategy in use, if any.protected final TimeZone
DefaultTimeZone
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 TypeFactory
Specific factory used for creatingJavaType
instances; needed to allow modules to add more custom type handling (mostly to support types of non-Java JVM languages)protected final TypeResolverBuilder<?>
Builder used to create type resolver for serializing and deserializing values for which polymorphic type handling is needed.protected final PolymorphicTypeValidator
Validator that is used to limit allowed polymorphic subtypes, mostly for security reasons when dealing with untrusted content. -
Constructor Summary
ConstructorDescriptionBaseSettings
(ClassIntrospector ci, AnnotationIntrospector ai, PropertyNamingStrategy pns, TypeFactory tf, TypeResolverBuilder<?> typer, DateFormat dateFormat, HandlerInstantiator hi, Locale locale, TimeZone tz, Base64Variant defaultBase64, PolymorphicTypeValidator ptv) Deprecated.BaseSettings
(ClassIntrospector ci, AnnotationIntrospector ai, PropertyNamingStrategy pns, TypeFactory tf, TypeResolverBuilder<?> typer, DateFormat dateFormat, HandlerInstantiator hi, Locale locale, TimeZone tz, Base64Variant defaultBase64, PolymorphicTypeValidator ptv, AccessorNamingStrategy.Provider accNaming) -
Method Summary
Modifier and TypeMethodDescriptioncopy()
Turns out we are not necessarily 100% stateless, alas, sinceClassIntrospector
typically has a cache.boolean
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).with
(Base64Variant base64) Fluent factory for constructing a new instance that uses specified TimeZone.withTypeResolverBuilder
(TypeResolverBuilder<?> typer)
-
Field Details
-
_typeFactory
Specific factory used for creatingJavaType
instances; needed to allow modules to add more custom type handling (mostly to support types of non-Java JVM languages) -
_classIntrospector
Introspector used to figure out Bean properties needed for bean serialization and deserialization. Overridable so that it is possible to change low-level details of introspection, like adding new annotation types. -
_annotationIntrospector
Introspector used for accessing annotation value based configuration. -
_propertyNamingStrategy
Custom property naming strategy in use, if any. -
_accessorNaming
Provider for creatingAccessorNamingStrategy
instances to use- Since:
- 2.12
-
_typeResolverBuilder
Builder used to create type resolver for serializing and deserializing values for which polymorphic type handling is needed. -
_typeValidator
Validator that is used to limit allowed polymorphic subtypes, mostly for security reasons when dealing with untrusted content.- Since:
- 2.10
-
_dateFormat
Custom date format to use for deserialization. If specified, will be used instead ofStdDateFormat
.Note that the configured format object will be cloned once per deserialization process (first time it is needed)
-
_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. -
_locale
DefaultLocale
used with serialization formats. Default value isLocale.getDefault()
. -
_timeZone
DefaultTimeZone
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. -
_defaultBase64
Explicitly defaultBase64Variant
to use for handling binary data (byte[]
), used with data formats that use base64 encoding (like JSON, CSV).- Since:
- 2.1
-
-
Constructor Details
-
BaseSettings
public BaseSettings(ClassIntrospector ci, AnnotationIntrospector ai, PropertyNamingStrategy pns, TypeFactory tf, TypeResolverBuilder<?> typer, DateFormat dateFormat, HandlerInstantiator hi, Locale locale, TimeZone tz, Base64Variant defaultBase64, PolymorphicTypeValidator ptv, AccessorNamingStrategy.Provider accNaming) - Since:
- 2.12
-
BaseSettings
@Deprecated public BaseSettings(ClassIntrospector ci, AnnotationIntrospector ai, PropertyNamingStrategy pns, TypeFactory tf, TypeResolverBuilder<?> typer, DateFormat dateFormat, HandlerInstantiator hi, Locale locale, TimeZone tz, Base64Variant defaultBase64, PolymorphicTypeValidator ptv) Deprecated.
-
-
Method Details
-
copy
Turns out we are not necessarily 100% stateless, alas, sinceClassIntrospector
typically has a cache. So this method is needed for deep copy() of Mapper.- Since:
- 2.9.6
-
withClassIntrospector
-
withAnnotationIntrospector
-
withInsertedAnnotationIntrospector
-
withAppendedAnnotationIntrospector
-
withPropertyNamingStrategy
-
withAccessorNaming
-
withTypeFactory
-
withTypeResolverBuilder
-
withDateFormat
-
withHandlerInstantiator
-
with
-
with
Fluent factory for constructing a new instance that uses specified TimeZone. Note that timezone used with also be assigned to configuredDateFormat
, changing time formatting defaults. -
with
- Since:
- 2.1
-
with
- Since:
- 2.10
-
getClassIntrospector
-
getAnnotationIntrospector
-
getPropertyNamingStrategy
-
getAccessorNaming
-
getTypeFactory
-
getTypeResolverBuilder
-
getPolymorphicTypeValidator
- Since:
- 2.10
-
getDateFormat
-
getHandlerInstantiator
-
getLocale
-
getTimeZone
-
hasExplicitTimeZone
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).- Since:
- 2.7
-
getBase64Variant
-