Package org.codehaus.jackson.jaxrs
Class MapperConfigurator
java.lang.Object
org.codehaus.jackson.jaxrs.MapperConfigurator
Helper class used to encapsulate details of configuring an
ObjectMapper instance to be used for data binding, as
well as accessing it.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Annotations[]Annotations set to use by default; overridden by explicit call tosetAnnotationsToUse(org.codehaus.jackson.jaxrs.Annotations[])protected ObjectMapperIf no mapper was specified when constructed, and no configuration calls are made, a default mapper is constructed.protected Class<? extends AnnotationIntrospector> To support optional dependency to Jackson-XC module (needed if and when JAXB annotations are used for configuration)protected ObjectMapperMapper provider was constructed with if any, or that was constructed due to a call to explicitly configure mapper. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected AnnotationIntrospectorprotected AnnotationIntrospector_resolveIntrospectors(Annotations[] annotationsToUse) protected void_setAnnotations(ObjectMapper mapper, Annotations[] annotationsToUse) voidconfigure(JsonGenerator.Feature f, boolean state) voidconfigure(JsonParser.Feature f, boolean state) voidconfigure(DeserializationConfig.Feature f, boolean state) voidconfigure(SerializationConfig.Feature f, boolean state) Method that locates, configures and returnsObjectMapperto useprotected ObjectMappermapper()Helper method that will ensure that there is a configurable non-default mapper (constructing an instance if one didn't yet exit), and return that mapper.voidsetAnnotationsToUse(Annotations[] annotationsToUse) void
-
Field Details
-
_mapper
Mapper provider was constructed with if any, or that was constructed due to a call to explicitly configure mapper. If defined (explicitly or implicitly) it will be used, instead of using provider-based lookup. -
_defaultMapper
If no mapper was specified when constructed, and no configuration calls are made, a default mapper is constructed. The difference between default mapper and regular one is that default mapper is only used if no mapper is found via provider lookup. -
_defaultAnnotationsToUse
Annotations set to use by default; overridden by explicit call tosetAnnotationsToUse(org.codehaus.jackson.jaxrs.Annotations[]) -
_jaxbIntrospectorClass
To support optional dependency to Jackson-XC module (needed if and when JAXB annotations are used for configuration)
-
-
Constructor Details
-
MapperConfigurator
-
-
Method Details
-
getConfiguredMapper
Method that locates, configures and returnsObjectMapperto use -
getDefaultMapper
-
setMapper
-
setAnnotationsToUse
-
configure
-
configure
-
configure
-
configure
-
mapper
Helper method that will ensure that there is a configurable non-default mapper (constructing an instance if one didn't yet exit), and return that mapper. -
_setAnnotations
-
_resolveIntrospectors
-
_resolveIntrospector
-