public abstract class MapperConfiguratorBase<IMPL extends MapperConfiguratorBase<IMPL,MAPPER>,MAPPER extends ObjectMapper> extends Object
ObjectMapper
instance to be used for data binding, as
well as accessing it.Modifier and Type | Field and Description |
---|---|
protected Annotations[] |
_defaultAnnotationsToUse
Annotations set to use by default; overridden by explicit call
to
setAnnotationsToUse(com.fasterxml.jackson.jaxrs.cfg.Annotations[]) |
protected MAPPER |
_defaultMapper
If no mapper was specified when constructed, and no configuration
calls are made, a default mapper is constructed.
|
protected Class<? extends AnnotationIntrospector> |
_jaxbIntrospectorClass
To support optional dependency to Jackson JAXB annotations module
(needed iff JAXB annotations are used for configuration)
|
protected MAPPER |
_mapper
Mapper provider was constructed with if any, or that was constructed
due to a call to explicitly configure mapper.
|
Constructor and Description |
---|
MapperConfiguratorBase(MAPPER mapper,
Annotations[] defaultAnnotations) |
Modifier and Type | Method and Description |
---|---|
protected abstract AnnotationIntrospector |
_resolveIntrospectors(Annotations[] annotationsToUse) |
protected void |
_setAnnotations(ObjectMapper mapper,
Annotations[] annotationsToUse) |
void |
configure(DeserializationFeature f,
boolean state) |
void |
configure(JsonGenerator.Feature f,
boolean state) |
void |
configure(JsonParser.Feature f,
boolean state) |
void |
configure(SerializationFeature f,
boolean state) |
abstract MAPPER |
getConfiguredMapper()
Method that locates, configures and returns
ObjectMapper to use |
abstract MAPPER |
getDefaultMapper() |
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.
|
void |
setAnnotationsToUse(Annotations[] annotationsToUse) |
void |
setMapper(MAPPER m) |
protected MAPPER extends ObjectMapper _mapper
protected MAPPER extends ObjectMapper _defaultMapper
protected Annotations[] _defaultAnnotationsToUse
setAnnotationsToUse(com.fasterxml.jackson.jaxrs.cfg.Annotations[])
protected Class<? extends AnnotationIntrospector> _jaxbIntrospectorClass
public MapperConfiguratorBase(MAPPER mapper, Annotations[] defaultAnnotations)
public abstract MAPPER getConfiguredMapper()
ObjectMapper
to usepublic abstract MAPPER getDefaultMapper()
protected abstract MAPPER mapper()
protected abstract AnnotationIntrospector _resolveIntrospectors(Annotations[] annotationsToUse)
public final void setMapper(MAPPER m)
public final void setAnnotationsToUse(Annotations[] annotationsToUse)
public final void configure(DeserializationFeature f, boolean state)
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)
protected final void _setAnnotations(ObjectMapper mapper, Annotations[] annotationsToUse)
Copyright © 2019 JBoss by Red Hat. All rights reserved.