org.codehaus.jackson.map
Interface MapperConfig<T extends MapperConfig<T>>

All Superinterfaces:
ClassIntrospector.MixInResolver
All Known Implementing Classes:
DeserializationConfig, SerializationConfig

public interface MapperConfig<T extends MapperConfig<T>>
extends ClassIntrospector.MixInResolver

Interface that defines functionality accessible through both serialization and deserialization configuration objects; accessors to mode-independent configuration settings and such.

Since:
1.2

Method Summary
 void addMixInAnnotations(Class<?> target, Class<?> mixinSource)
          Method to use for adding mix-in annotations to use for augmenting specified class or interface.
 T createUnshared(TypeResolverBuilder<?> typer, VisibilityChecker<?> vc)
          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()
           
 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).
 void setAnnotationIntrospector(AnnotationIntrospector introspector)
           
 void setIntrospector(ClassIntrospector<? extends BeanDescription> i)
           
 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.
 

Method Detail

fromAnnotations

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. Note that not all annotations have global significance, and thus only subset of Jackson annotations will have any effect.


createUnshared

T createUnshared(TypeResolverBuilder<?> typer,
                 VisibilityChecker<?> vc)
Method to use for constructing an instance that is not shared between multiple operations but only used for a single one.


getAnnotationIntrospector

AnnotationIntrospector getAnnotationIntrospector()

setAnnotationIntrospector

void setAnnotationIntrospector(AnnotationIntrospector introspector)

setIntrospector

void setIntrospector(ClassIntrospector<? extends BeanDescription> i)

setMixInAnnotations

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. Mixing in is done when introspecting class annotations and properties. Map passed contains keys that are target classes (ones to augment with new annotation overrides), and values that are source classes (have annotations to use for augmentation). Annotations from source classes (and their supertypes) will override annotations that target classes (and their super-types) have.

Since:
1.2

addMixInAnnotations

void addMixInAnnotations(Class<?> target,
                         Class<?> mixinSource)
Method to use for adding mix-in annotations to use for augmenting specified class or interface. All annotations from mixinSource are taken to override annotations that target (or its supertypes) has.

Parameters:
target - Class (or interface) whose annotations to effectively override
mixinSource - Class (or interface) whose annotations are to be "added" to target's annotations, overriding as necessary
Since:
1.2

findMixInClassFor

Class<?> findMixInClassFor(Class<?> cls)
Method that will check if there are "mix-in" classes (with mix-in annotations) for given class

Specified by:
findMixInClassFor in interface ClassIntrospector.MixInResolver

getDefaultTyper

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). If such default handler is configured, it is returned; otherwise null is returned.

Since:
1.5

getDefaultVisibilityChecker

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). Can be changed to allow different minimum visibility levels for auto-detection. Note that this is the global handler; individual types (classes) can further override active checker used (using JsonAutoDetect annotation)

Since:
1.5