|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.fasterxml.jackson.databind.cfg.MapperConfig<T>
public abstract class MapperConfig<T extends MapperConfig<T>>
Interface that defines functionality accessible through both
serialization and deserialization configuration objects;
accessors to mode-independent configuration settings
and such.
In addition, shared features are defined
in MapperFeature
.
Small part of implementation is included here by aggregating
BaseSettings
instance that contains configuration
that is shared between different types of instances.
Field Summary | |
---|---|
protected BaseSettings |
_base
Immutable container object for simple configuration settings. |
protected int |
_mapperFeatures
Set of shared mapper features enabled. |
Constructor Summary | |
---|---|
protected |
MapperConfig(BaseSettings base,
int mapperFeatures)
|
protected |
MapperConfig(MapperConfig<T> src)
|
Method Summary | ||
---|---|---|
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. |
|
static
|
collectFeatureDefaults(Class<F> enumClass)
Method that calculates bit set (flags) of all features that are enabled by default. |
|
JavaType |
constructSpecializedType(JavaType baseType,
Class<?> subclass)
|
|
JavaType |
constructType(Class<?> cls)
Helper method that will construct JavaType for given
raw class. |
|
JavaType |
constructType(com.fasterxml.jackson.core.type.TypeReference<?> valueTypeRef)
Helper method that will construct JavaType for given
type reference
This is a simple short-cut for: |
|
abstract Class<?> |
getActiveView()
Accessor for finding currently active view, if any (null if none) |
|
AnnotationIntrospector |
getAnnotationIntrospector()
Method for getting AnnotationIntrospector configured
to introspect annotation values used for configuration. |
|
ClassIntrospector |
getClassIntrospector()
|
|
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). |
|
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). |
|
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). |
|
HandlerInstantiator |
getHandlerInstantiator()
|
|
Locale |
getLocale()
Method for accessing the default Locale to use
for formatting, unless overridden by local annotations. |
|
PropertyNamingStrategy |
getPropertyNamingStrategy()
|
|
abstract SubtypeResolver |
getSubtypeResolver()
|
|
TimeZone |
getTimeZone()
Method for accessing the default TimeZone to use
for formatting, unless overridden by local annotations. |
|
TypeFactory |
getTypeFactory()
|
|
BeanDescription |
introspectClassAnnotations(Class<?> cls)
Accessor for getting bean description that only contains class annotations: useful if no getter/setter/creator information is needed. |
|
abstract BeanDescription |
introspectClassAnnotations(JavaType type)
Accessor for getting bean description that only contains class annotations: useful if no getter/setter/creator information is needed. |
|
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. |
|
abstract 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. |
|
boolean |
isAnnotationProcessingEnabled()
Method for determining whether annotation processing is enabled or not (default settings are typically that it is enabled; must explicitly disable). |
|
boolean |
isEnabled(MapperFeature f)
Accessor for simple mapper features (which are shared for serialization, deserialization) |
|
boolean |
shouldSortPropertiesAlphabetically()
Accessor for checking whether default settings for property handling indicate that properties should be alphabetically ordered or not. |
|
TypeIdResolver |
typeIdResolverInstance(Annotated annotated,
Class<? extends TypeIdResolver> resolverClass)
Method that can be called to obtain an instance of TypeIdResolver of
specified type. |
|
TypeResolverBuilder<?> |
typeResolverBuilderInstance(Annotated annotated,
Class<? extends TypeResolverBuilder<?>> builderClass)
Method that can be called to obtain an instance of TypeIdResolver of
specified type. |
|
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. |
|
abstract T |
with(MapperFeature... features)
Method for constructing and returning a new instance with specified mapper features enabled. |
|
abstract T |
without(MapperFeature... features)
Method for constructing and returning a new instance with specified mapper features disabled. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.fasterxml.jackson.databind.introspect.ClassIntrospector.MixInResolver |
---|
findMixInClassFor |
Field Detail |
---|
protected final int _mapperFeatures
protected final BaseSettings _base
Constructor Detail |
---|
protected MapperConfig(BaseSettings base, int mapperFeatures)
protected MapperConfig(MapperConfig<T> src)
Method Detail |
---|
public static <F extends Enum<F> & ConfigFeature> int collectFeatureDefaults(Class<F> enumClass)
public abstract T with(MapperFeature... features)
public abstract T without(MapperFeature... features)
public final boolean isEnabled(MapperFeature f)
public final boolean isAnnotationProcessingEnabled()
public final boolean canOverrideAccessModifiers()
public final boolean shouldSortPropertiesAlphabetically()
public abstract boolean useRootWrapping()
public ClassIntrospector getClassIntrospector()
public AnnotationIntrospector getAnnotationIntrospector()
AnnotationIntrospector
configured
to introspect annotation values used for configuration.
Non-final since it is actually overridden by sub-classes (for now?)
public VisibilityChecker<?> getDefaultVisibilityChecker()
JsonAutoDetect
annotation)
public final PropertyNamingStrategy getPropertyNamingStrategy()
public final HandlerInstantiator getHandlerInstantiator()
public final TypeResolverBuilder<?> getDefaultTyper(JavaType baseType)
public abstract SubtypeResolver getSubtypeResolver()
public final TypeFactory getTypeFactory()
public final JavaType constructType(Class<?> cls)
JavaType
for given
raw class.
This is a simple short-cut for:
getTypeFactory().constructType(cls);
public final JavaType constructType(com.fasterxml.jackson.core.type.TypeReference<?> valueTypeRef)
JavaType
for given
type reference
This is a simple short-cut for:
getTypeFactory().constructType(valueTypeRef);
public JavaType constructSpecializedType(JavaType baseType, Class<?> subclass)
public BeanDescription introspectClassAnnotations(Class<?> cls)
public abstract BeanDescription introspectClassAnnotations(JavaType type)
public BeanDescription introspectDirectClassAnnotations(Class<?> cls)
public abstract BeanDescription introspectDirectClassAnnotations(JavaType type)
public final DateFormat getDateFormat()
Note that typically DateFormat
instances are not thread-safe
(at least ones provided by JDK):
this means that calling code should clone format instance before
using it.
This method is usually only called by framework itself, since there
are convenience methods available via
DeserializationContext
and SerializerProvider
that
take care of cloning and thread-safe reuse.
public final Locale getLocale()
Locale
to use
for formatting, unless overridden by local annotations.
Initially set to Locale.getDefault()
.
public final TimeZone getTimeZone()
TimeZone
to use
for formatting, unless overridden by local annotations.
Initially set to TimeZone.getDefault()
.
public abstract Class<?> getActiveView()
public TypeResolverBuilder<?> typeResolverBuilderInstance(Annotated annotated, Class<? extends TypeResolverBuilder<?>> builderClass)
TypeIdResolver
of
specified type.
public TypeIdResolver typeIdResolverInstance(Annotated annotated, Class<? extends TypeIdResolver> resolverClass)
TypeIdResolver
of
specified type.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |