|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface 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.
| Method Summary | ||
|---|---|---|
void |
addMixInAnnotations(Class<?> target,
Class<?> mixinSource)
Method to use for adding mix-in annotations to use for augmenting specified class or interface. |
|
void |
appendAnnotationIntrospector(AnnotationIntrospector ai)
Method for registering specified AnnotationIntrospector as the lowest
priority introspector, chained with existing introspector(s) and called
as fallback for cases not otherwise handled. |
|
T |
createUnshared(TypeResolverBuilder<?> typer,
VisibilityChecker<?> vc,
SubtypeResolver subtypeResolver)
Method to use for constructing an instance that is not shared between multiple operations but only used for a single one. |
|
Class<?> |
findMixInClassFor(Class<?> cls)
Method that will check if there are "mix-in" classes (with mix-in annotations) for given class |
|
void |
fromAnnotations(Class<?> cls)
Method that checks class annotations that the argument Object has, and modifies settings of this configuration object accordingly, similar to how those annotations would affect actual value classes annotated with them, but with global scope. |
|
AnnotationIntrospector |
getAnnotationIntrospector()
|
|
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). |
|
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). |
|
void |
insertAnnotationIntrospector(AnnotationIntrospector introspector)
Method for registering specified AnnotationIntrospector as the highest
priority introspector (will be chained with existing introspector(s) which
will be used as fallbacks for cases this introspector does not handle) |
|
|
introspectClassAnnotations(Class<?> cls)
Accessor for getting bean description that only contains class annotations: useful if no getter/setter/creator information is needed. |
|
|
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. |
|
void |
setAnnotationIntrospector(AnnotationIntrospector introspector)
Method for replacing existing annotation introspector(s) with specified introspector. |
|
void |
setDateFormat(DateFormat df)
Method that wiTll define specific date format to use for reading/writing Date and Calendar values; instance is used as is, without creating a clone. |
|
void |
setIntrospector(ClassIntrospector<? extends BeanDescription> i)
Method for replacing existing ClassIntrospector with
specified replacement. |
|
void |
setMixInAnnotations(Map<Class<?>,Class<?>> mixins)
Method to use for defining mix-in annotations to use for augmenting annotations that processable (serializable / deserializable) classes have. |
|
void |
setSubtypeResolver(SubtypeResolver r)
Method for overriding subtype resolver used. |
|
| Method Detail |
|---|
void fromAnnotations(Class<?> cls)
T createUnshared(TypeResolverBuilder<?> typer,
VisibilityChecker<?> vc,
SubtypeResolver subtypeResolver)
AnnotationIntrospector getAnnotationIntrospector()
void setAnnotationIntrospector(AnnotationIntrospector introspector)
void insertAnnotationIntrospector(AnnotationIntrospector introspector)
AnnotationIntrospector as the highest
priority introspector (will be chained with existing introspector(s) which
will be used as fallbacks for cases this introspector does not handle)
introspector - Annotation introspector to register.void appendAnnotationIntrospector(AnnotationIntrospector ai)
AnnotationIntrospector as the lowest
priority introspector, chained with existing introspector(s) and called
as fallback for cases not otherwise handled.
ai - Annotation introspector to register.void setIntrospector(ClassIntrospector<? extends BeanDescription> i)
ClassIntrospector with
specified replacement.
void setMixInAnnotations(Map<Class<?>,Class<?>> mixins)
void addMixInAnnotations(Class<?> target,
Class<?> mixinSource)
mixinSource are taken to override annotations
that target (or its supertypes) has.
target - Class (or interface) whose annotations to effectively overridemixinSource - Class (or interface) whose annotations are to
be "added" to target's annotations, overriding as necessaryClass<?> findMixInClassFor(Class<?> cls)
findMixInClassFor in interface ClassIntrospector.MixInResolverDateFormat 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.
void setDateFormat(DateFormat df)
getDateFormat().
TypeResolverBuilder<?> getDefaultTyper(JavaType baseType)
VisibilityChecker<?> getDefaultVisibilityChecker()
JsonAutoDetect annotation)
SubtypeResolver getSubtypeResolver()
void setSubtypeResolver(SubtypeResolver r)
<DESC extends BeanDescription> DESC introspectClassAnnotations(Class<?> cls)
<DESC extends BeanDescription> DESC introspectDirectClassAnnotations(Class<?> cls)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||