Top Description Fields Constructors Methods
tools.jackson.jaxrs.cfg

public abstract Class MapperConfiguratorBase<IMPL extends MapperConfiguratorBase<IMPL, MAPPER>, MAPPER extends ObjectMapper>

extends Object
Class Inheritance
Imports
java.util.EnumMap, .Map, java.util.concurrent.locks.ReentrantLock, tools.jackson.databind.*, tools.jackson.databind.cfg.MapperBuilder, tools.jackson.jaxrs.cfg.MapperConfiguratorBase

Helper class used to encapsulate details of configuring an ObjectMapper instance to be used for data binding, as well as accessing it.

Field Summary

Modifier and TypeField and Description
protected MAPPER
_defaultMapper

If no mapper was specified when constructed, and no configuration calls are made, a default mapper is constructed.

protected EnumMap<DeserializationFeature, Boolean>
_deserFeatures

DeserializationFeatures to explicitly enable or disable

protected AnnotationIntrospector
_instropectorOverride

AnnotationIntrospector to use as an override over default JacksonAnnotationIntrospector, if any.

private final ReentrantLock
protected MAPPER
_mapper

Mapper provider was constructed with if any, or that was constructed due to a call to explicitly configure mapper.

protected EnumMap<MapperFeature, Boolean>
_mapperFeatures

DeserializationFeatures to explicitly enable or disable

protected EnumMap<SerializationFeature, Boolean>
_serFeatures

SerializationFeatures to explicitly enable or disable

Constructor Summary

AccessConstructor and Description
public
MapperConfiguratorBase(MAPPER mapper, AnnotationIntrospector instropectorOverride)

Method Summary

Modifier and TypeMethod and Description
protected MapperBuilder<?, ?>
_builderWithConfiguration(MapperBuilder<?, ?> mapperBuilder)

Overridable helper method that applies all configuration on given builder.

protected MAPPER
_mapperWithConfiguration(MapperBuilder<?, ?> mapperBuilder)

Helper method that will configure given builder using configured overrides.

public final void
public final void
configure(SerializationFeature f, boolean state)

public MAPPER
getConfiguredMapper()

Method that locates, configures and returns ObjectMapper to use

public MAPPER
protected MAPPER
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.

protected abstract MapperBuilder<?, ?>
public final void
public final void
setMapper(MAPPER m)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_defaultMapperback to summary
protected MAPPER _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.

_deserFeaturesback to summary
protected EnumMap<DeserializationFeature, Boolean> _deserFeatures

DeserializationFeatures to explicitly enable or disable

_instropectorOverrideback to summary
protected AnnotationIntrospector _instropectorOverride

AnnotationIntrospector to use as an override over default JacksonAnnotationIntrospector, if any.

Since
3.0
_lockback to summary
private final ReentrantLock _lock
_mapperback to summary
protected MAPPER _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.

_mapperFeaturesback to summary
protected EnumMap<MapperFeature, Boolean> _mapperFeatures

DeserializationFeatures to explicitly enable or disable

_serFeaturesback to summary
protected EnumMap<SerializationFeature, Boolean> _serFeatures

SerializationFeatures to explicitly enable or disable

Constructor Detail

MapperConfiguratorBaseback to summary
public MapperConfiguratorBase(MAPPER mapper, AnnotationIntrospector instropectorOverride)

Method Detail

_builderWithConfigurationback to summary
protected MapperBuilder<?, ?> _builderWithConfiguration(MapperBuilder<?, ?> mapperBuilder)

Overridable helper method that applies all configuration on given builder.

_mapperWithConfigurationback to summary
protected MAPPER _mapperWithConfiguration(MapperBuilder<?, ?> mapperBuilder)

Helper method that will configure given builder using configured overrides.

Annotations
@SuppressWarnings:unchecked
configureback to summary
public final void configure(DeserializationFeature f, boolean state)
configureback to summary
public final void configure(SerializationFeature f, boolean state)
getConfiguredMapperback to summary
public MAPPER getConfiguredMapper()

Method that locates, configures and returns ObjectMapper to use

getDefaultMapperback to summary
public MAPPER getDefaultMapper()
mapperback to summary
protected MAPPER 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.

mapperBuilderback to summary
protected abstract MapperBuilder<?, ?> mapperBuilder()
Since
3.0
setAnnotationIntrospectorback to summary
public final void setAnnotationIntrospector(AnnotationIntrospector aiOverride)
setMapperback to summary
public final void setMapper(MAPPER m)