ObjectMappers. Same can not be done with 2.10 for backwards-compatibility
reasons; but we can offer sort of "fake" builder, which simply encapsulates
configuration calls. The main (and only) point is to allow gradual upgrade.
| Modifier and Type | Field and Description |
|---|---|
| protected final M |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected final B | |
| public B | Returns: Builder instance itself to allow chainingStrategy instance to use; if null, use the default implementation sMethod for configuring |
| public B | activateDefaultTyping(PolymorphicTypeValidator subtypeValidator)
Convenience method that is equivalent to calling activateDefaultTyping(subtypeValidator, DefaultTyping.OBJECT_AND_NON_CONCRETE); |
| public B | activateDefaultTyping(PolymorphicTypeValidator subtypeValidator, ObjectMapper.
Convenience method that is equivalent to calling activateDefaultTyping(subtypeValidator, dti, JsonTypeInfo.As.WRAPPER_ARRAY); |
| public B | activateDefaultTyping(PolymorphicTypeValidator subtypeValidator, ObjectMapper.
Defines kinds of types for which additional type information
is added; see applicability,DefaultTyping for more information.Method for enabling automatic inclusion of type information, needed
for proper deserialization of polymorphic types (unless types
have been annotated with |
| public B | activateDefaultTypingAsProperty(PolymorphicTypeValidator subtypeValidator, ObjectMapper.
Method for enabling automatic inclusion of type information -- needed
for proper deserialization of polymorphic types (unless types
have been annotated with Note choice of |
| public B | addHandler(DeserializationProblemHandler h)
Method used for adding a |
| public B | Returns: This builder instance to allow call chainingTarget class on which to add annotations target, Class<?> Class that has annotations to add mixinSource)Method to use for defining mix-in annotations to use for augmenting annotations that classes have, for purpose of configuration serialization and/or deserialization processing. |
| public B | |
| public B | |
| public B | |
| public B | annotationIntrospector(AnnotationIntrospector intr)
Method for replacing |
| public M | |
| public B | |
| public B | clearProblemHandlers()
Method that may be used to remove all |
| public B | |
| public B | |
| public B | |
| public B | |
| public B | |
| public B | |
| public B | |
| public B | |
| public B | constructorDetector(ConstructorDetector cd)
Method for specifying |
| public B | deactivateDefaultTyping()
Method for disabling automatic inclusion of type information; if so, only
explicitly annotated types (ones with
|
| public B | Returns: This Builder instance to allow call chainingDefault instance to use: may not be attrs)null.Method for replacing default |
| public B | Returns: This builder instance to allow call chainingBase64 variant to use v)Method that will configure default |
| public B | defaultDateFormat(DateFormat df)
Method for configuring the default |
| public B | defaultLeniency(Boolean b)
Method for setting default Setter configuration, regarding things like merging, null-handling; used for properties for which there are no per-type or per-property overrides (via annotations or config overrides). |
| public B | |
| public B | defaultMergeable(Boolean b)
Method for setting default Setter configuration, regarding things like merging, null-handling; used for properties for which there are no per-type or per-property overrides (via annotations or config overrides). |
| public B | |
| public B | Returns: This builder instance to allow call chainingDefault property inclusion to set inclMethod for configured default property inclusion to use for serialization. |
| public B | |
| public B | |
| public B | |
| public B | |
| public B | |
| public B | |
| public B | |
| public B | |
| public B | |
| public B | |
| public B | |
| public B | |
| public B | |
| public B | |
| public B | |
| public B | |
| public B | |
| public B | |
| public B | filterProvider(FilterProvider prov)
Method for configuring this mapper to use specified |
| public B | findAndAddModules()
Convenience method that is functionally equivalent to:
As with |
| public static List | findModules()
Method for locating available methods, using JDK |
| public static List | findModules(ClassLoader classLoader)
Method for locating available methods, using JDK |
| public B | Returns: Builder instance itself to allow chainingInstantiator to use; if null, use the default implementation hi)Method for configuring |
| public B | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public B | |
| public B | polymorphicTypeValidator(PolymorphicTypeValidator ptv)
Method for assigning |
| public B | Returns: Builder instance itself to allow chainingStrategy instance to use; if null, use the default implementation s)Method for configuring |
| public B | |
| public B | |
| public B | |
| public B | Returns: This builder instance to allow call chainingTarget class for which no mix-ins should remain after call target)Method that allows making sure that specified |
| private static <T> ServiceLoader | |
| public B | Returns: This builder instance to allow call chainingDefault property inclusion to set inclMethod for configured default property inclusion to use for serialization. |
| public B | |
| public B | setDefaultTyping(TypeResolverBuilder<?>
Type information inclusion handler typer)Method for enabling automatic inclusion of type information, using specified handler object for determining which types this affects, as well as details of how information is embedded. |
| public TokenStreamFactory | |
| public B | |
| public B | |
| public B | |
| public B | |
| public B | withCoercionConfig(LogicalType forType, Consumer<MutableCoercionConfig> handler)
Method for changing coercion config for specific logical types, through callback to specific handler. |
| public B | withCoercionConfig(Class<?> forType, Consumer<MutableCoercionConfig> handler)
Method for changing coercion config for specific physical type, through callback to specific handler. |
| public B | withCoercionConfigDefaults(Consumer<MutableCoercionConfig> handler)
Method for changing target-type-independent coercion configuration defaults. |
| public B | withConfigOverride(Class<?>
Type to change config overrides for forType, Consumer<MutableConfigOverride> Function to call with handler)MutableConfigOverrideMethod for changing config overrides for specific type, through callback to specific handler. |
| _mapper | back to summary |
|---|---|
| protected final M _mapper | |
| MapperBuilder | back to summary |
|---|---|
| protected MapperBuilder(M mapper) | |
| _this | back to summary |
|---|---|
protected final B _this()
| |
| accessorNaming | back to summary |
|---|---|
| public B accessorNaming(AccessorNamingStrategy. Method for configuring
| |
| activateDefaultTyping | back to summary |
|---|---|
| public B activateDefaultTyping(PolymorphicTypeValidator subtypeValidator) Convenience method that is equivalent to calling activateDefaultTyping(subtypeValidator, DefaultTyping.OBJECT_AND_NON_CONCRETE); Note choice of | |
| activateDefaultTyping | back to summary |
|---|---|
| public B activateDefaultTyping(PolymorphicTypeValidator subtypeValidator, ObjectMapper. Convenience method that is equivalent to calling activateDefaultTyping(subtypeValidator, dti, JsonTypeInfo.As.WRAPPER_ARRAY); Note choice of | |
| activateDefaultTyping | back to summary |
|---|---|
| public B activateDefaultTyping(PolymorphicTypeValidator subtypeValidator, ObjectMapper. Method for enabling automatic inclusion of type information, needed
for proper deserialization of polymorphic types (unless types
have been annotated with Note use of Note choice of
| |
| activateDefaultTypingAsProperty | back to summary |
|---|---|
| public B activateDefaultTypingAsProperty(PolymorphicTypeValidator subtypeValidator, ObjectMapper. Method for enabling automatic inclusion of type information -- needed
for proper deserialization of polymorphic types (unless types
have been annotated with Note choice of | |
| addHandler | back to summary |
|---|---|
| public B addHandler(DeserializationProblemHandler h) Method used for adding a | |
| addMixIn | back to summary |
|---|---|
| public B addMixIn(Class<?> target, Class<?> mixinSource) Method to use for defining mix-in annotations to use for augmenting annotations that classes have, for purpose of configuration serialization and/or deserialization processing. Mixing in is done when introspecting class annotations and properties. Annotations from "mixin" class (and its supertypes) will override annotations that target classes (and their super-types) have.
Note that standard mixin handler implementations will only allow a single mix-in
source class per target, so if there was a previous mix-in defined target it will
be cleared. This also means that you can remove mix-in definition by specifying
| |
| addModule | back to summary |
|---|---|
| public B addModule(Module module) | |
| addModules | back to summary |
|---|---|
| public B addModules(Module... modules) | |
| addModules | back to summary |
|---|---|
| public B addModules(Iterable<? extends Module> modules) | |
| annotationIntrospector | back to summary |
|---|---|
| public B annotationIntrospector(AnnotationIntrospector intr) Method for replacing | |
| build | back to summary |
|---|---|
| public M build() Method to call to create actual mapper instance. Implementation detail: in 2.10 (but not 3.x) underlying mapper is eagerly constructed when builder is constructed, and method simply returns that instance. | |
| cacheProvider | back to summary |
|---|---|
public B cacheProvider(CacheProvider cacheProvider)
| |
| clearProblemHandlers | back to summary |
|---|---|
| public B clearProblemHandlers() Method that may be used to remove all | |
| configure | back to summary |
|---|---|
public B configure(MapperFeature feature, boolean state)
| |
| configure | back to summary |
|---|---|
| public B configure(SerializationFeature feature, boolean state) | |
| configure | back to summary |
|---|---|
| public B configure(DeserializationFeature feature, boolean state) | |
| configure | back to summary |
|---|---|
| public B configure(DatatypeFeature feature, boolean state) | |
| configure | back to summary |
|---|---|
| public B configure(JsonParser. | |
| configure | back to summary |
|---|---|
| public B configure(JsonGenerator. | |
| configure | back to summary |
|---|---|
| public B configure(StreamReadFeature feature, boolean state) | |
| configure | back to summary |
|---|---|
| public B configure(StreamWriteFeature feature, boolean state) | |
| constructorDetector | back to summary |
|---|---|
| public B constructorDetector(ConstructorDetector cd) Method for specifying
| |
| deactivateDefaultTyping | back to summary |
|---|---|
| public B deactivateDefaultTyping() Method for disabling automatic inclusion of type information; if so, only
explicitly annotated types (ones with
| |
| defaultAttributes | back to summary |
|---|---|
| public B defaultAttributes(ContextAttributes attrs) Method for replacing default Note instance specified will need to be thread-safe for usage, similar to the
default (
| |
| defaultBase64Variant | back to summary |
|---|---|
| public B defaultBase64Variant(Base64Variant v) Method that will configure default
| |
| defaultDateFormat | back to summary |
|---|---|
| public B defaultDateFormat(DateFormat df) Method for configuring the default | |
| defaultLeniency | back to summary |
|---|---|
| public B defaultLeniency(Boolean b) Method for setting default Setter configuration, regarding things like merging, null-handling; used for properties for which there are no per-type or per-property overrides (via annotations or config overrides). | |
| defaultLocale | back to summary |
|---|---|
| public B defaultLocale(Locale locale) Method for overriding default locale to use for formatting.
Default value used is | |
| defaultMergeable | back to summary |
|---|---|
| public B defaultMergeable(Boolean b) Method for setting default Setter configuration, regarding things like merging, null-handling; used for properties for which there are no per-type or per-property overrides (via annotations or config overrides). | |
| defaultPrettyPrinter | back to summary |
|---|---|
| public B defaultPrettyPrinter(PrettyPrinter pp) | |
| defaultPropertyInclusion | back to summary |
|---|---|
| public B defaultPropertyInclusion(JsonInclude. Method for configured default property inclusion to use for serialization.
| |
| defaultSetterInfo | back to summary |
|---|---|
| public B defaultSetterInfo(JsonSetter. | |
| defaultTimeZone | back to summary |
|---|---|
| public B defaultTimeZone(TimeZone tz) Method for overriding default TimeZone to use for formatting. Default value used is UTC (NOT default TimeZone of JVM). | |
| disable | back to summary |
|---|---|
public B disable(MapperFeature... features)
| |
| disable | back to summary |
|---|---|
| public B disable(SerializationFeature... features) | |
| disable | back to summary |
|---|---|
| public B disable(DeserializationFeature... features) | |
| disable | back to summary |
|---|---|
| public B disable(DatatypeFeature... features) | |
| disable | back to summary |
|---|---|
| public B disable(JsonParser. | |
| disable | back to summary |
|---|---|
| public B disable(JsonGenerator. | |
| disable | back to summary |
|---|---|
| public B disable(StreamReadFeature... features) | |
| disable | back to summary |
|---|---|
| public B disable(StreamWriteFeature... features) | |
| enable | back to summary |
|---|---|
public B enable(MapperFeature... features)
| |
| enable | back to summary |
|---|---|
| public B enable(SerializationFeature... features) | |
| enable | back to summary |
|---|---|
| public B enable(DeserializationFeature... features) | |
| enable | back to summary |
|---|---|
| public B enable(DatatypeFeature... features) | |
| enable | back to summary |
|---|---|
| public B enable(JsonParser. | |
| enable | back to summary |
|---|---|
| public B enable(JsonGenerator. | |
| enable | back to summary |
|---|---|
| public B enable(StreamReadFeature... features) | |
| enable | back to summary |
|---|---|
| public B enable(StreamWriteFeature... features) | |
| filterProvider | back to summary |
|---|---|
| public B filterProvider(FilterProvider prov) Method for configuring this mapper to use specified
Note that usually it is better to use method in | |
| findAndAddModules | back to summary |
|---|---|
| public B findAndAddModules() Convenience method that is functionally equivalent to:
As with | |
| findModules | back to summary |
|---|---|
| public static List Method for locating available methods, using JDK Note that method does not do any caching, so calls should be considered potentially expensive. | |
| findModules | back to summary |
|---|---|
| public static List Method for locating available methods, using JDK Note that method does not do any caching, so calls should be considered potentially expensive. | |
| handlerInstantiator | back to summary |
|---|---|
| public B handlerInstantiator(HandlerInstantiator hi) Method for configuring
| |
| injectableValues | back to summary |
|---|---|
| public B injectableValues(InjectableValues v) | |
| isEnabled | back to summary |
|---|---|
| public boolean isEnabled(MapperFeature f) | |
| isEnabled | back to summary |
|---|---|
| public boolean isEnabled(DeserializationFeature f) | |
| isEnabled | back to summary |
|---|---|
| public boolean isEnabled(SerializationFeature f) | |
| isEnabled | back to summary |
|---|---|
| public boolean isEnabled(JsonParser. | |
| isEnabled | back to summary |
|---|---|
| public boolean isEnabled(JsonGenerator. | |
| nodeFactory | back to summary |
|---|---|
| public B nodeFactory(JsonNodeFactory f) | |
| polymorphicTypeValidator | back to summary |
|---|---|
| public B polymorphicTypeValidator(PolymorphicTypeValidator ptv) Method for assigning Validator will be called on validating types for which no default databind deserializer, or module-provided deserializer is found: typically this includes "POJO" (aka Bean) types, but not (for example) most container types.
| |
| propertyNamingStrategy | back to summary |
|---|---|
| public B propertyNamingStrategy(PropertyNamingStrategy s) Method for configuring
| |
| registerSubtypes | back to summary |
|---|---|
| public B registerSubtypes(Class<?>... subtypes) | |
| registerSubtypes | back to summary |
|---|---|
| public B registerSubtypes(NamedType... subtypes) | |
| registerSubtypes | back to summary |
|---|---|
| public B registerSubtypes(Collection<Class<?>> subtypes) | |
| removeMixIn | back to summary |
|---|---|
| public B removeMixIn(Class<?> target) Method that allows making sure that specified Note removing mix-ins for given class does not try to remove possible mix-ins for any of its super classes and super interfaces; only direct mix-in addition, if any, is removed.
| |
| secureGetServiceLoader | back to summary |
|---|---|
| private static <T> ServiceLoader | |
| serializationInclusion | back to summary |
|---|---|
| public B serializationInclusion(JsonInclude. Method for configured default property inclusion to use for serialization.
| |
| serializerFactory | back to summary |
|---|---|
| public B serializerFactory(SerializerFactory f) | |
| setDefaultTyping | back to summary |
|---|---|
| public B setDefaultTyping(TypeResolverBuilder<?> typer) Method for enabling automatic inclusion of type information, using specified handler object for determining which types this affects, as well as details of how information is embedded. Note use of Default Typing can be a potential security risk if incoming
content comes from untrusted sources, so care should be taken to use
a
| |
| streamFactory | back to summary |
|---|---|
| public TokenStreamFactory streamFactory() | |
| subtypeResolver | back to summary |
|---|---|
| public B subtypeResolver(SubtypeResolver r) | |
| typeFactory | back to summary |
|---|---|
| public B typeFactory(TypeFactory f) | |
| visibility | back to summary |
|---|---|
| public B visibility(VisibilityChecker<?> vc) | |
| visibility | back to summary |
|---|---|
| public B visibility(PropertyAccessor forMethod, JsonAutoDetect. | |
| withCoercionConfig | back to summary |
|---|---|
| public B withCoercionConfig(LogicalType forType, Consumer<MutableCoercionConfig> handler) Method for changing coercion config for specific logical types, through callback to specific handler.
| |
| withCoercionConfig | back to summary |
|---|---|
| public B withCoercionConfig(Class<?> forType, Consumer<MutableCoercionConfig> handler) Method for changing coercion config for specific physical type, through callback to specific handler.
| |
| withCoercionConfigDefaults | back to summary |
|---|---|
| public B withCoercionConfigDefaults(Consumer<MutableCoercionConfig> handler) Method for changing target-type-independent coercion configuration defaults.
| |
| withConfigOverride | back to summary |
|---|---|
| public B withConfigOverride(Class<?> forType, Consumer<MutableConfigOverride> handler) Method for changing config overrides for specific type, through callback to specific handler.
| |