com.fasterxml.jackson.annotation

## Class JsonSetter.Value

- java.lang.Object
- - com.fasterxml.jackson.annotation.JsonSetter.Value

All Implemented Interfaces:
  JacksonAnnotationValue<JsonSetter>, Serializable

Enclosing class:
  JsonSetter

    public static class JsonSetter.Value
    extends Object
    implements JacksonAnnotationValue<JsonSetter>, Serializable

Helper class used to contain information from a single `JsonSetter` annotation, as well as to provide possible overrides from non-annotation sources.

Since:
  2.9
See Also:
  Serialized Form

### Field Summary

Fields
`protected static JsonSetter.Value` `EMPTY` Default instance used in place of "default settings".

### Constructor Summary

Constructors
`protected` `Value(Nulls nulls, Nulls contentNulls)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static JsonSetter.Value` `construct(Nulls nulls, Nulls contentNulls)` Factory method that may be used (although is NOT the recommended way) to construct an instance from a full set of properties.
`static JsonSetter.Value` `empty()` Accessor for default instances which has "empty" settings; that is: Null handling using global defaults, `Nulls.DEFAULT`.
`boolean` `equals(Object o)`
`static JsonSetter.Value` `forContentNulls(Nulls nulls)`
`static JsonSetter.Value` `forValueNulls(Nulls nulls)`
`static JsonSetter.Value` `forValueNulls(Nulls nulls, Nulls contentNulls)`
`static JsonSetter.Value` `from(JsonSetter src)`
`Nulls` `getContentNulls()`
`Nulls` `getValueNulls()`
`int` `hashCode()`
`static JsonSetter.Value` `merge(JsonSetter.Value base, JsonSetter.Value overrides)` Helper method that will try to combine values from two `JsonSetter.Value` instances, using one as base settings, and the other as overrides to use instead of base values when defined; base values are only use if override does not specify a value (matching value is null or logically missing).
`Nulls` `nonDefaultContentNulls()` Returns same as `getContentNulls()` unless value would be `Nulls.DEFAULT` in which case `null` is returned.
`Nulls` `nonDefaultValueNulls()` Returns same as `getValueNulls()` unless value would be `Nulls.DEFAULT` in which case `null` is returned.
`protected Object` `readResolve()`
`String` `toString()`
`Class<JsonSetter>` `valueFor()` Introspection method that may be used to find actual annotation that may be used as the source for value instance.
`JsonSetter.Value` `withContentNulls(Nulls nulls)`
`JsonSetter.Value` `withOverrides(JsonSetter.Value overrides)` Mutant factory method that merges values of this value with given override values, so that any explicitly defined inclusion in overrides has precedence over settings of this value instance.
`JsonSetter.Value` `withValueNulls(Nulls nulls)`
`JsonSetter.Value` `withValueNulls(Nulls valueNulls, Nulls contentNulls)`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Field Detail

#### EMPTY

    protected static final JsonSetter.Value EMPTY

Default instance used in place of "default settings".

### Constructor Detail

#### Value

    protected Value(Nulls nulls,
                    Nulls contentNulls)

### Method Detail

#### valueFor

    public Class<JsonSetter> valueFor()

Description copied from interface: `JacksonAnnotationValue`
Introspection method that may be used to find actual annotation that may be used as the source for value instance.

Specified by:
  `valueFor` in interface `JacksonAnnotationValue<JsonSetter>`
Returns:
  Annotation class for which instances of this value class are created

#### readResolve

    protected Object readResolve()

#### from

    public static JsonSetter.Value from(JsonSetter src)

#### construct

    public static JsonSetter.Value construct(Nulls nulls,
                                             Nulls contentNulls)

Factory method that may be used (although is NOT the recommended way) to construct an instance from a full set of properties. Most users would be better of starting by `empty()` instance and using `withXxx`/`withoutXxx` methods, as this factory method may need to be changed if new properties are added in `JsonIgnoreProperties` annotation.

#### empty

    public static JsonSetter.Value empty()

Accessor for default instances which has "empty" settings; that is:

- Null handling using global defaults, `Nulls.DEFAULT`.

#### merge

    public static JsonSetter.Value merge(JsonSetter.Value base,
                                         JsonSetter.Value overrides)

Helper method that will try to combine values from two `JsonSetter.Value` instances, using one as base settings, and the other as overrides to use instead of base values when defined; base values are only use if override does not specify a value (matching value is null or logically missing). Note that one or both of value instances may be `null`, directly; if both are `null`, result will also be `null`; otherwise never null.

#### forValueNulls

    public static JsonSetter.Value forValueNulls(Nulls nulls)

#### forValueNulls

    public static JsonSetter.Value forValueNulls(Nulls nulls,
                                                 Nulls contentNulls)

#### forContentNulls

    public static JsonSetter.Value forContentNulls(Nulls nulls)

#### withOverrides

    public JsonSetter.Value withOverrides(JsonSetter.Value overrides)

Mutant factory method that merges values of this value with given override values, so that any explicitly defined inclusion in overrides has precedence over settings of this value instance. If no overrides exist will return `this` instance; otherwise new `JsonSetter.Value` with changed inclusion values.

#### withValueNulls

    public JsonSetter.Value withValueNulls(Nulls nulls)

#### withValueNulls

    public JsonSetter.Value withValueNulls(Nulls valueNulls,
                                           Nulls contentNulls)

#### withContentNulls

    public JsonSetter.Value withContentNulls(Nulls nulls)

#### getValueNulls

    public Nulls getValueNulls()

#### getContentNulls

    public Nulls getContentNulls()

#### nonDefaultValueNulls

    public Nulls nonDefaultValueNulls()

Returns same as `getValueNulls()` unless value would be `Nulls.DEFAULT` in which case `null` is returned.

#### nonDefaultContentNulls

    public Nulls nonDefaultContentNulls()

Returns same as `getContentNulls()` unless value would be `Nulls.DEFAULT` in which case `null` is returned.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`

#### equals

    public boolean equals(Object o)

Overrides:
  `equals` in class `Object`