ObjectMapper, which
passes an immutable instance for serialization process to
SerializationContext and SerializerFactory
(either directly, or through ObjectWriter.
Note that instances are considered immutable and as such no copies should need to be created for sharing; all copying is done with "fluent factory" methods.
| Modifier and Type | Field and Description |
|---|---|
| protected final PrettyPrinter | _defaultPrettyPrinter
If "default pretty-printing" is enabled, it will create the instance from this blueprint object. |
| protected final FilterProvider | _filterProvider
Object used for resolving filter ids to filter instances. |
| protected final int | _formatWriteFeatures
States of |
| protected final int | _serFeatures
Set of |
| protected final int | _streamWriteFeatures
States of |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | SerializationConfig(MapperBuilder<?, ?> b, long mapperFeatures, int serFeatures, int streamWriteFeatures, int formatWriteFeatures, ConfigOverrides configOverrides, TypeFactory tf, ClassIntrospector classIntr, MixInHandler mixins, SubtypeResolver str, ContextAttributes defaultAttrs, RootNameLookup rootNames, FilterProvider filterProvider)
|
| private | SerializationConfig(SerializationConfig src, int serFeatures, int streamWriteFeatures, int formatWriteFeatures)
|
| private | |
| private | |
| private | |
| private | |
| protected | |
| protected | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected final SerializationConfig | _with(DatatypeFeatures dtFeatures)
Implements abstract tools.
|
| protected final SerializationConfig | _withBase(BaseSettings newBase)
Implements abstract tools.
|
| public PrettyPrinter | |
| public Converter | |
| public PrettyPrinter | getDefaultPrettyPrinter()
Accessor for configured blueprint "default" |
| public FilterProvider | getFilterProvider()
Method for getting provider used for locating filters given id (which is usually provided with filter annotations). |
| public int | |
| public final int | |
| public int | |
| public final boolean | |
| public final boolean | hasSerializationFeatures(int featureMask)
"Bulk" access method for checking that all features specified by mask are enabled. |
| public final boolean | Returns: True if feature is enabled; false otherwiseFeature to check feature)Accessor for checking whether give |
| public final boolean | isEnabled(StreamWriteFeature f)
Accessor method that first checks if we have any overrides for feature, and only if not, checks state of passed-in factory. |
| public boolean | useRootWrapping()
Implements abstract tools. Accessor for checking whether configuration indicates that "root wrapping" (use of an extra property/name pair at root level) is expected or not. |
| public SerializationConfig | with(ContextAttributes attrs)
Implements abstract tools. Method for constructing an instance that has specified contextual attributes. |
| public SerializationConfig | with(DateFormat df)
Overrides tools. In addition to constructing instance with specified date format,
will enable or disable |
| public SerializationConfig | with(SerializationFeature feature)
Fluent factory method that will construct and return a new configuration object instance with specified feature enabled. |
| public SerializationConfig | with(SerializationFeature first, SerializationFeature... features)
Fluent factory method that will construct and return a new configuration object instance with specified features enabled. |
| public SerializationConfig | with(StreamWriteFeature feature)
Fluent factory method that will construct and return a new configuration object instance with specified feature enabled. |
| public SerializationConfig | with(FormatFeature feature)
Fluent factory method that will construct and return a new configuration object instance with specified feature enabled. |
| public SerializationConfig | |
| public SerializationConfig | withFeatures(SerializationFeature... features)
Fluent factory method that will construct and return a new configuration object instance with specified features enabled. |
| public SerializationConfig | withFeatures(StreamWriteFeature... features)
Fluent factory method that will construct and return a new configuration object instance with specified features enabled. |
| public SerializationConfig | withFeatures(FormatFeature... features)
Fluent factory method that will construct and return a new configuration object instance with specified features enabled. |
| public SerializationConfig | |
| public SerializationConfig | without(SerializationFeature feature)
Fluent factory method that will construct and return a new configuration object instance with specified feature disabled. |
| public SerializationConfig | without(SerializationFeature first, SerializationFeature... features)
Fluent factory method that will construct and return a new configuration object instance with specified features disabled. |
| public SerializationConfig | without(StreamWriteFeature feature)
Fluent factory method that will construct and return a new configuration object instance with specified feature disabled. |
| public SerializationConfig | without(FormatFeature feature)
Fluent factory method that will construct and return a new configuration object instance with specified feature disabled. |
| public SerializationConfig | withoutFeatures(SerializationFeature... features)
Fluent factory method that will construct and return a new configuration object instance with specified features disabled. |
| public SerializationConfig | withoutFeatures(StreamWriteFeature... features)
Fluent factory method that will construct and return a new configuration object instance with specified features disabled. |
| public SerializationConfig | withoutFeatures(FormatFeature... features)
Fluent factory method that will construct and return a new configuration object instance with specified features disabled. |
| public SerializationConfig | withRootName(PropertyName rootName)
Implements abstract tools. Method for constructing and returning a new instance with different root name to use (none, if null). |
| public SerializationConfig | withView(Class<?> view)
Implements abstract tools. Method for constructing and returning a new instance with different view to use. |
| _defaultPrettyPrinter | back to summary |
|---|---|
| protected final PrettyPrinter _defaultPrettyPrinter If "default pretty-printing" is enabled, it will create the instance from this blueprint object. | |
| _filterProvider | back to summary |
|---|---|
| protected final FilterProvider _filterProvider Object used for resolving filter ids to filter instances. Non-null if explicitly defined; null by default. | |
| _formatWriteFeatures | back to summary |
|---|---|
| protected final int _formatWriteFeatures States of | |
| _serFeatures | back to summary |
|---|---|
| protected final int _serFeatures Set of | |
| _streamWriteFeatures | back to summary |
|---|---|
| protected final int _streamWriteFeatures States of | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides tools. | |
| SerializationConfig | back to summary |
|---|---|
public SerializationConfig(MapperBuilder<?, ?> b, long mapperFeatures, int serFeatures, int streamWriteFeatures, int formatWriteFeatures, ConfigOverrides configOverrides, TypeFactory tf, ClassIntrospector classIntr, MixInHandler mixins, SubtypeResolver str, ContextAttributes defaultAttrs, RootNameLookup rootNames, FilterProvider filterProvider)
| |
| SerializationConfig | back to summary |
|---|---|
| private SerializationConfig(SerializationConfig src, int serFeatures, int streamWriteFeatures, int formatWriteFeatures) | |
| SerializationConfig | back to summary |
|---|---|
| private SerializationConfig(SerializationConfig src, BaseSettings base) | |
| SerializationConfig | back to summary |
|---|---|
| private SerializationConfig(SerializationConfig src, FilterProvider filters) | |
| SerializationConfig | back to summary |
|---|---|
| private SerializationConfig(SerializationConfig src, Class<?> view) | |
| SerializationConfig | back to summary |
|---|---|
| private SerializationConfig(SerializationConfig src, PropertyName rootName) | |
| SerializationConfig | back to summary |
|---|---|
| protected SerializationConfig(SerializationConfig src, ContextAttributes attrs) | |
| SerializationConfig | back to summary |
|---|---|
| protected SerializationConfig(SerializationConfig src, PrettyPrinter defaultPP) | |
| SerializationConfig | back to summary |
|---|---|
| protected SerializationConfig(SerializationConfig src, DatatypeFeatures dtFeatures) | |
| _with | back to summary |
|---|---|
| protected final SerializationConfig _with(DatatypeFeatures dtFeatures) Implements abstract tools.
| |
| _withBase | back to summary |
|---|---|
| protected final SerializationConfig _withBase(BaseSettings newBase) Implements abstract tools.
| |
| constructDefaultPrettyPrinter | back to summary |
|---|---|
| public PrettyPrinter constructDefaultPrettyPrinter() | |
| findSerializationConverter | back to summary |
|---|---|
| public Converter | |
| getDefaultPrettyPrinter | back to summary |
|---|---|
| public PrettyPrinter getDefaultPrettyPrinter() Accessor for configured blueprint "default" Note returns the "blueprint" instance, and does NOT construct
an instance ready to use; call | |
| getFilterProvider | back to summary |
|---|---|
| public FilterProvider getFilterProvider() Method for getting provider used for locating filters given
id (which is usually provided with filter annotations).
Will be null if no provided was set for | |
| getFormatWriteFeatures | back to summary |
|---|---|
public int getFormatWriteFeatures()
| |
| getSerializationFeatures | back to summary |
|---|---|
| public final int getSerializationFeatures() | |
| getStreamWriteFeatures | back to summary |
|---|---|
public int getStreamWriteFeatures()
| |
| hasFormatFeature | back to summary |
|---|---|
| public final boolean hasFormatFeature(FormatFeature f) | |
| hasSerializationFeatures | back to summary |
|---|---|
| public final boolean hasSerializationFeatures(int featureMask) "Bulk" access method for checking that all features specified by mask are enabled. | |
| isEnabled | back to summary |
|---|---|
| public final boolean isEnabled(SerializationFeature feature) Accessor for checking whether give
| |
| isEnabled | back to summary |
|---|---|
| public final boolean isEnabled(StreamWriteFeature f) Accessor method that first checks if we have any overrides for feature, and only if not, checks state of passed-in factory. | |
| useRootWrapping | back to summary |
|---|---|
| public boolean useRootWrapping() Implements abstract tools. Doc from tools. Accessor for checking whether configuration indicates that "root wrapping" (use of an extra property/name pair at root level) is expected or not.
| |
| with | back to summary |
|---|---|
| public SerializationConfig with(ContextAttributes attrs) Implements abstract tools. Doc from tools. Method for constructing an instance that has specified contextual attributes.
| |
| with | back to summary |
|---|---|
| public SerializationConfig with(DateFormat df) Overrides tools. In addition to constructing instance with specified date format,
will enable or disable
| |
| with | back to summary |
|---|---|
| public SerializationConfig with(SerializationFeature feature) Fluent factory method that will construct and return a new configuration object instance with specified feature enabled. | |
| with | back to summary |
|---|---|
| public SerializationConfig with(SerializationFeature first, SerializationFeature... features) Fluent factory method that will construct and return a new configuration object instance with specified features enabled. | |
| with | back to summary |
|---|---|
| public SerializationConfig with(StreamWriteFeature feature) Fluent factory method that will construct and return a new configuration object instance with specified feature enabled. | |
| with | back to summary |
|---|---|
| public SerializationConfig with(FormatFeature feature) Fluent factory method that will construct and return a new configuration object instance with specified feature enabled. | |
| withDefaultPrettyPrinter | back to summary |
|---|---|
| public SerializationConfig withDefaultPrettyPrinter(PrettyPrinter pp) | |
| withFeatures | back to summary |
|---|---|
| public SerializationConfig withFeatures(SerializationFeature... features) Fluent factory method that will construct and return a new configuration object instance with specified features enabled. | |
| withFeatures | back to summary |
|---|---|
| public SerializationConfig withFeatures(StreamWriteFeature... features) Fluent factory method that will construct and return a new configuration object instance with specified features enabled. | |
| withFeatures | back to summary |
|---|---|
| public SerializationConfig withFeatures(FormatFeature... features) Fluent factory method that will construct and return a new configuration object instance with specified features enabled. | |
| withFilters | back to summary |
|---|---|
| public SerializationConfig withFilters(FilterProvider filterProvider) | |
| without | back to summary |
|---|---|
| public SerializationConfig without(SerializationFeature feature) Fluent factory method that will construct and return a new configuration object instance with specified feature disabled. | |
| without | back to summary |
|---|---|
| public SerializationConfig without(SerializationFeature first, SerializationFeature... features) Fluent factory method that will construct and return a new configuration object instance with specified features disabled. | |
| without | back to summary |
|---|---|
| public SerializationConfig without(StreamWriteFeature feature) Fluent factory method that will construct and return a new configuration object instance with specified feature disabled. | |
| without | back to summary |
|---|---|
| public SerializationConfig without(FormatFeature feature) Fluent factory method that will construct and return a new configuration object instance with specified feature disabled. | |
| withoutFeatures | back to summary |
|---|---|
| public SerializationConfig withoutFeatures(SerializationFeature... features) Fluent factory method that will construct and return a new configuration object instance with specified features disabled. | |
| withoutFeatures | back to summary |
|---|---|
| public SerializationConfig withoutFeatures(StreamWriteFeature... features) Fluent factory method that will construct and return a new configuration object instance with specified features disabled. | |
| withoutFeatures | back to summary |
|---|---|
| public SerializationConfig withoutFeatures(FormatFeature... features) Fluent factory method that will construct and return a new configuration object instance with specified features disabled. | |
| withRootName | back to summary |
|---|---|
| public SerializationConfig withRootName(PropertyName rootName) Implements abstract tools. Doc from tools. Method for constructing and returning a new instance with different root name to use (none, if null).
Note that when a root name is set to a non-Empty String, this will automatically force use
of root element wrapping with given name. If empty String passed, will
disable root name wrapping; and if null used, will instead use
| |
| withView | back to summary |
|---|---|
| public SerializationConfig withView(Class<?> view) Implements abstract tools. Doc from tools. Method for constructing and returning a new instance with different view to use.
| |