public abstract class MapperConfigBase<CFG extends ConfigFeature,T extends MapperConfigBase<CFG,T>> extends MapperConfig<T> implements java.io.Serializable
Modifier and Type | Method and Description |
---|---|
ClassIntrospector.MixInResolver |
copy()
Method called to create a new, non-shared copy, to be used by different
ObjectMapper instance, and one that should not be connected
to this instance, if resolver has mutable state. |
ConfigOverride |
findConfigOverride(java.lang.Class<?> type)
Accessor for finding possible
ConfigOverride to use for
properties of given type. |
java.lang.Class<?> |
findMixInClassFor(java.lang.Class<?> cls)
Method that will check if there are "mix-in" classes (with mix-in
annotations) for given class
|
PropertyName |
findRootName(java.lang.Class<?> rawRootType) |
PropertyName |
findRootName(JavaType rootType) |
java.lang.Class<?> |
getActiveView()
Accessor for finding currently active view, if any (null if none)
|
ContextAttributes |
getAttributes()
Method for accessing per-instance shared (baseline/default)
attribute values; these are used as the basis for per-call
attributes.
|
JsonFormat.Value |
getDefaultPropertyFormat(java.lang.Class<?> type)
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).
|
JsonIgnoreProperties.Value |
getDefaultPropertyIgnorals(java.lang.Class<?> type)
Accessor for default property ignorals to use, if any, for given base type,
based on config overrides settings (see
MapperConfig.findConfigOverride(Class) ). |
JsonIgnoreProperties.Value |
getDefaultPropertyIgnorals(java.lang.Class<?> baseType,
AnnotatedClass actualClass)
Helper method that may be called to see if there are property ignoral
definitions from annotations (via
AnnotatedClass ) or through
"config overrides". |
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).
|
PropertyName |
getFullRootName() |
java.lang.String |
getRootName()
Deprecated.
Since 2.6 use
getFullRootName() instead. |
SubtypeResolver |
getSubtypeResolver()
Accessor for object used for finding out all reachable subtypes
for supertypes; needed when a logical type name is used instead
of class name (or custom scheme).
|
int |
mixInCount()
Test-only method -- does not reflect possibly open-ended set that external
mix-in resolver might provide.
|
abstract T |
with(AnnotationIntrospector ai)
Method for constructing and returning a new instance with different
AnnotationIntrospector to use (replacing old one). |
abstract T |
with(Base64Variant base64)
Method for constructing and returning a new instance with different
default
Base64Variant to use with base64-encoded binary values. |
abstract T |
with(ClassIntrospector ci)
Method for constructing and returning a new instance with different
ClassIntrospector
to use. |
abstract T |
with(ContextAttributes attrs)
Method for constructing an instance that has specified
contextual attributes.
|
abstract T |
with(java.text.DateFormat df)
Method for constructing and returning a new instance with different
DateFormat
to use. |
abstract T |
with(HandlerInstantiator hi)
Method for constructing and returning a new instance with different
HandlerInstantiator
to use. |
abstract T |
with(java.util.Locale l)
Method for constructing and returning a new instance with different
default
Locale to use for formatting. |
abstract T |
with(PropertyNamingStrategy strategy)
Method for constructing and returning a new instance with different
PropertyNamingStrategy
to use. |
abstract T |
with(SubtypeResolver str)
Method for constructing and returning a new instance with different
SubtypeResolver
to use. |
abstract T |
with(java.util.TimeZone tz)
Method for constructing and returning a new instance with different
default
TimeZone to use for formatting of date values. |
abstract T |
with(TypeFactory typeFactory)
Method for constructing and returning a new instance with different
TypeFactory
to use. |
abstract T |
with(TypeResolverBuilder<?> trb)
Method for constructing and returning a new instance with different
TypeResolverBuilder to use. |
abstract T |
with(VisibilityChecker<?> vc)
Method for constructing and returning a new instance with different
VisibilityChecker
to use. |
abstract T |
withAppendedAnnotationIntrospector(AnnotationIntrospector introspector)
Method for constructing and returning a new instance with additional
AnnotationIntrospector appended (as the lowest priority one) |
T |
withAttribute(java.lang.Object key,
java.lang.Object value)
Method for constructing an instance that has specified
value for attribute for given key.
|
T |
withAttributes(java.util.Map<?,?> attributes)
Method for constructing an instance that has only specified
attributes, removing any attributes that exist before the call.
|
abstract T |
withInsertedAnnotationIntrospector(AnnotationIntrospector introspector)
Method for constructing and returning a new instance with additional
AnnotationIntrospector inserted (as the highest priority one) |
T |
withoutAttribute(java.lang.Object key)
Method for constructing an instance that has no
value for attribute for given key.
|
abstract T |
withRootName(PropertyName rootName)
Method for constructing and returning a new instance with different
root name to use (none, if null).
|
T |
withRootName(java.lang.String rootName) |
abstract T |
withView(java.lang.Class<?> view)
Method for constructing and returning a new instance with different
view to use.
|
abstract T |
withVisibility(PropertyAccessor forMethod,
JsonAutoDetect.Visibility visibility)
Method for constructing and returning a new instance with different
minimal visibility level for specified property type
|
canOverrideAccessModifiers, collectFeatureDefaults, compileString, constructSpecializedType, constructType, constructType, getAnnotationIntrospector, getBase64Variant, getClassIntrospector, getDateFormat, getDefaultPropertyInclusion, getDefaultPropertyInclusion, getDefaultPropertyInclusion, getDefaultTyper, getHandlerInstantiator, getLocale, getPropertyNamingStrategy, getTimeZone, getTypeFactory, hasMapperFeatures, introspectClassAnnotations, introspectClassAnnotations, introspectDirectClassAnnotations, introspectDirectClassAnnotations, isAnnotationProcessingEnabled, isEnabled, shouldSortPropertiesAlphabetically, typeIdResolverInstance, typeResolverBuilderInstance, useRootWrapping, with, with, without
public VisibilityChecker<?> getDefaultVisibilityChecker()
MapperConfig
JsonAutoDetect
annotation)getDefaultVisibilityChecker
in class MapperConfig<T extends MapperConfigBase<CFG,T>>
public abstract T with(AnnotationIntrospector ai)
AnnotationIntrospector
to use (replacing old one).
NOTE: make sure to register new instance with ObjectMapper
if directly calling this method.
public abstract T withAppendedAnnotationIntrospector(AnnotationIntrospector introspector)
AnnotationIntrospector
appended (as the lowest priority one)public abstract T withInsertedAnnotationIntrospector(AnnotationIntrospector introspector)
AnnotationIntrospector
inserted (as the highest priority one)public abstract T with(ClassIntrospector ci)
ClassIntrospector
to use.
NOTE: make sure to register new instance with ObjectMapper
if directly calling this method.
public abstract T with(java.text.DateFormat df)
DateFormat
to use.
NOTE: make sure to register new instance with ObjectMapper
if directly calling this method.
public abstract T with(HandlerInstantiator hi)
HandlerInstantiator
to use.
NOTE: make sure to register new instance with ObjectMapper
if directly calling this method.
public abstract T with(PropertyNamingStrategy strategy)
PropertyNamingStrategy
to use.
NOTE: make sure to register new instance with ObjectMapper
if directly calling this method.
public abstract T withRootName(PropertyName rootName)
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.
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 T withRootName(java.lang.String rootName)
public abstract T with(SubtypeResolver str)
SubtypeResolver
to use.
NOTE: make sure to register new instance with ObjectMapper
if directly calling this method.
public abstract T with(TypeFactory typeFactory)
TypeFactory
to use.public abstract T with(TypeResolverBuilder<?> trb)
TypeResolverBuilder
to use.public abstract T withView(java.lang.Class<?> view)
public abstract T with(VisibilityChecker<?> vc)
VisibilityChecker
to use.public abstract T withVisibility(PropertyAccessor forMethod, JsonAutoDetect.Visibility visibility)
public abstract T with(java.util.Locale l)
Locale
to use for formatting.public abstract T with(java.util.TimeZone tz)
TimeZone
to use for formatting of date values.public abstract T with(Base64Variant base64)
Base64Variant
to use with base64-encoded binary values.public abstract T with(ContextAttributes attrs)
public T withAttributes(java.util.Map<?,?> attributes)
public T withAttribute(java.lang.Object key, java.lang.Object value)
public T withoutAttribute(java.lang.Object key)
public final SubtypeResolver getSubtypeResolver()
getSubtypeResolver
in class MapperConfig<T extends MapperConfigBase<CFG,T>>
@Deprecated public final java.lang.String getRootName()
getFullRootName()
instead.public final PropertyName getFullRootName()
public final java.lang.Class<?> getActiveView()
MapperConfig
getActiveView
in class MapperConfig<T extends MapperConfigBase<CFG,T>>
public final ContextAttributes getAttributes()
MapperConfig
getAttributes
in class MapperConfig<T extends MapperConfigBase<CFG,T>>
public final ConfigOverride findConfigOverride(java.lang.Class<?> type)
MapperConfig
ConfigOverride
to use for
properties of given type. Note that only directly associate override
is found; no type hierarchy traversal is performed.findConfigOverride
in class MapperConfig<T extends MapperConfigBase<CFG,T>>
public final JsonFormat.Value getDefaultPropertyFormat(java.lang.Class<?> type)
MapperConfig
getDefaultPropertyFormat
in class MapperConfig<T extends MapperConfigBase<CFG,T>>
public final JsonIgnoreProperties.Value getDefaultPropertyIgnorals(java.lang.Class<?> type)
MapperConfig
MapperConfig.findConfigOverride(Class)
).getDefaultPropertyIgnorals
in class MapperConfig<T extends MapperConfigBase<CFG,T>>
public final JsonIgnoreProperties.Value getDefaultPropertyIgnorals(java.lang.Class<?> baseType, AnnotatedClass actualClass)
MapperConfig
AnnotatedClass
) or through
"config overrides". If both exist, config overrides have precedence
over class annotations.getDefaultPropertyIgnorals
in class MapperConfig<T extends MapperConfigBase<CFG,T>>
public PropertyName findRootName(JavaType rootType)
findRootName
in class MapperConfig<T extends MapperConfigBase<CFG,T>>
public PropertyName findRootName(java.lang.Class<?> rawRootType)
findRootName
in class MapperConfig<T extends MapperConfigBase<CFG,T>>
public final java.lang.Class<?> findMixInClassFor(java.lang.Class<?> cls)
findMixInClassFor
in interface ClassIntrospector.MixInResolver
public ClassIntrospector.MixInResolver copy()
ClassIntrospector.MixInResolver
ObjectMapper
instance, and one that should not be connected
to this instance, if resolver has mutable state.
If resolver is immutable may simply return `this`.copy
in interface ClassIntrospector.MixInResolver
public final int mixInCount()
"Copyright © 2010 - 2018 Adobe Systems Incorporated. All Rights Reserved"