org.codehaus.jackson.map
Interface MapperConfig

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

public interface MapperConfig
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.
 MapperConfig createUnshared()
          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()
           
 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

MapperConfig createUnshared()
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