Top Description Fields Constructors Methods
com.fasterxml.jackson.jakarta.rs.cfg

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

extends Object
Class Inheritance
Imports
com.fasterxml.jackson.core.*, com.fasterxml.jackson.databind.*

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 final Annotations[]
_defaultAnnotationsToUse

Annotations set to use by default; overridden by explicit call to setAnnotationsToUse.

protected volatile MAPPER
_defaultMapper

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

protected volatile MAPPER
_mapper

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

protected Class<? extends AnnotationIntrospector>
_xmlBindIntrospectorClass

To support optional dependency to Jackson Jakarta XmlBind annotations module (needed iff Jakarta XmlBind annotations are used for configuration)

Constructor Summary

AccessConstructor and Description
public
MapperConfiguratorBase(MAPPER mapper, Annotations[] defaultAnnotations)

Method Summary

Modifier and TypeMethod and Description
protected abstract AnnotationIntrospector
_resolveIntrospectors(Annotations[] annotationsToUse)

protected final void
_setAnnotations(ObjectMapper mapper, Annotations[] annotationsToUse)

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

public final void
configure(JsonParser.Feature f, boolean state)

public final void
configure(JsonGenerator.Feature f, boolean state)

public abstract MAPPER
getConfiguredMapper()

Method that locates, configures and returns ObjectMapper to use

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

public final void
setAnnotationsToUse(Annotations[] annotationsToUse)

public final void
setMapper(MAPPER m)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_defaultAnnotationsToUseback to summary
protected final Annotations[] _defaultAnnotationsToUse

Annotations set to use by default; overridden by explicit call to setAnnotationsToUse. Marked final in v2.17.1.

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

_mapperback to summary
protected volatile 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.

_xmlBindIntrospectorClassback to summary
protected Class<? extends AnnotationIntrospector> _xmlBindIntrospectorClass

To support optional dependency to Jackson Jakarta XmlBind annotations module (needed iff Jakarta XmlBind annotations are used for configuration)

Constructor Detail

MapperConfiguratorBaseback to summary
public MapperConfiguratorBase(MAPPER mapper, Annotations[] defaultAnnotations)

Method Detail

_resolveIntrospectorsback to summary
protected abstract AnnotationIntrospector _resolveIntrospectors(Annotations[] annotationsToUse)
_setAnnotationsback to summary
protected final void _setAnnotations(ObjectMapper mapper, Annotations[] annotationsToUse)
configureback to summary
public final void configure(DeserializationFeature f, boolean state)
configureback to summary
public final void configure(SerializationFeature f, boolean state)
configureback to summary
public final void configure(JsonParser.Feature f, boolean state)
configureback to summary
public final void configure(JsonGenerator.Feature f, boolean state)
getConfiguredMapperback to summary
public abstract MAPPER getConfiguredMapper()

Method that locates, configures and returns ObjectMapper to use

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

setAnnotationsToUseback to summary
public final void setAnnotationsToUse(Annotations[] annotationsToUse)
setMapperback to summary
public final void setMapper(MAPPER m)