SettableBeanProperty implementation that will try to access value of
the property first, and if non-null value found, pass that for update
(using tools.jackson.databind.ValueDeserializer#deserialize(tools.jackson.core.JsonParser, tools.jackson.databind.DeserializationContext, Object) )
instead of constructing a new value. This is necessary to support "merging" properties.
Note that there are many similarities to SetterlessProperty, which predates
this variant; and that one is even used in cases where there is no mutator
available.
| Modifier and Type | Field and Description |
|---|---|
| protected final AnnotatedMember | _accessor
Member (field, method) used for accessing existing value. |
| Access | Constructor and Description |
|---|---|
| protected | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public static MergingSettableBeanProperty | |
| public void | deserializeAndSet(JsonParser p, DeserializationContext ctxt, Object instance)
Overrides tools. Method called to deserialize appropriate value, given parser (and context), and set it using appropriate mechanism. |
| public Object | deserializeSetAndReturn(JsonParser p, DeserializationContext ctxt, Object instance)
Overrides tools. Alternative to |
| public boolean | isMerging()
Overrides tools. Whether this property requires merging of values (read-then-write) |
| public void | set(DeserializationContext ctxt, Object instance, Object value)
Overrides tools. Method called to assign given value to this property, on specified Object. |
| public Object | setAndReturn(DeserializationContext ctxt, Object instance, Object value)
Overrides tools. Method called to assign given value to this property, on specified Object, and return whatever delegating accessor returned (if anything) Note this is an optional operation, not supported by all implementations, creator-backed properties for example do not support this method. |
| protected SettableBeanProperty | withDelegate(SettableBeanProperty d)
Implements abstract tools. Method sub-classes must implement, to construct a new instance with given delegate. |
| _accessor | back to summary |
|---|---|
| protected final AnnotatedMember _accessor Member (field, method) used for accessing existing value. | |
| MergingSettableBeanProperty | back to summary |
|---|---|
| protected MergingSettableBeanProperty(SettableBeanProperty delegate, AnnotatedMember accessor) | |
| MergingSettableBeanProperty | back to summary |
|---|---|
| protected MergingSettableBeanProperty(MergingSettableBeanProperty src, SettableBeanProperty delegate) | |
| construct | back to summary |
|---|---|
| public static MergingSettableBeanProperty construct(SettableBeanProperty delegate, AnnotatedMember accessor) | |
| deserializeAndSet | back to summary |
|---|---|
| public void deserializeAndSet(JsonParser p, DeserializationContext ctxt, Object instance) throws JacksonException Overrides tools. Doc from tools. Method called to deserialize appropriate value, given parser (and context), and set it using appropriate mechanism. Pre-condition is that passed parser must point to the first token that should be consumed to produce the value (the only value for scalars, multiple for Objects and Arrays).
| |
| deserializeSetAndReturn | back to summary |
|---|---|
| public Object deserializeSetAndReturn(JsonParser p, DeserializationContext ctxt, Object instance) throws JacksonException Overrides tools. Doc from tools. Alternative to
| |
| isMerging | back to summary |
|---|---|
| public boolean isMerging() Overrides tools. Doc from tools. Whether this property requires merging of values (read-then-write)
| |
| set | back to summary |
|---|---|
| public void set(DeserializationContext ctxt, Object instance, Object value) Overrides tools. Doc from tools. Method called to assign given value to this property, on specified Object. Note this is an optional operation, not supported by all implementations, creator-backed properties for example do not support this method.
| |
| setAndReturn | back to summary |
|---|---|
| public Object setAndReturn(DeserializationContext ctxt, Object instance, Object value) Overrides tools. Doc from tools. Method called to assign given value to this property, on specified Object, and return whatever delegating accessor returned (if anything) Note this is an optional operation, not supported by all implementations, creator-backed properties for example do not support this method.
| |
| withDelegate | back to summary |
|---|---|
| protected SettableBeanProperty withDelegate(SettableBeanProperty d) Implements abstract tools. Doc from tools. Method sub-classes must implement, to construct a new instance with given delegate.
| |