Class MapperConfiguratorBase<IMPL extends MapperConfiguratorBase<IMPL,MAPPER>,MAPPER extends ObjectMapper>
java.lang.Object
com.fasterxml.jackson.jakarta.rs.cfg.MapperConfiguratorBase<IMPL,MAPPER>
- Direct Known Subclasses:
JsonMapperConfigurator
public abstract class MapperConfiguratorBase<IMPL extends MapperConfiguratorBase<IMPL,MAPPER>,MAPPER extends ObjectMapper>
extends Object
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 final Annotations[]Annotations set to use by default; overridden by explicit call tosetAnnotationsToUse(com.fasterxml.jackson.jakarta.rs.cfg.Annotations[]).protected MAPPERIf no mapper was specified when constructed, and no configuration calls are made, a default mapper is constructed.protected MAPPERMapper provider was constructed with if any, or that was constructed due to a call to explicitly configure mapper.protected Class<? extends AnnotationIntrospector>To support optional dependency to Jackson Jakarta XmlBind annotations module (needed iff Jakarta XmlBind annotations are used for configuration) -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract AnnotationIntrospector_resolveIntrospectors(Annotations[] annotationsToUse) protected final void_setAnnotations(ObjectMapper mapper, Annotations[] annotationsToUse) final voidconfigure(JsonGenerator.Feature f, boolean state) final voidconfigure(JsonParser.Feature f, boolean state) final voidconfigure(DeserializationFeature f, boolean state) final voidconfigure(SerializationFeature f, boolean state) abstract MAPPERMethod that locates, configures and returnsObjectMapperto useabstract MAPPERprotected abstract MAPPERmapper()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.final voidsetAnnotationsToUse(Annotations[] annotationsToUse) final 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(com.fasterxml.jackson.jakarta.rs.cfg.Annotations[]). Marked final in v2.17.1. -
_xmlBindIntrospectorClass
To support optional dependency to Jackson Jakarta XmlBind annotations module (needed iff Jakarta XmlBind annotations are used for configuration)
-
-
Constructor Details
-
MapperConfiguratorBase
-
-
Method Details
-
getConfiguredMapper
Method that locates, configures and returnsObjectMapperto use -
getDefaultMapper
-
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. -
_resolveIntrospectors
-
setMapper
-
setAnnotationsToUse
-
configure
-
configure
-
configure
-
configure
-
_setAnnotations
-