SettableBeanProperty implementation that will try to access value of
the property first, and if non-null value found, pass that for update
(using com.fasterxml.jackson.databind.JsonDeserializer#deserialize(com.fasterxml.jackson.core.JsonParser, com.fasterxml.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. |
| private static final long |
| 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 com. |
| public Object | deserializeSetAndReturn(JsonParser p, DeserializationContext ctxt, Object instance)
Overrides com. deserializeAndSet that returns
either return value of setter method called (if one is),
or null to indicate that no return value is available.
|
| public void | set(Object instance, Object value)
Overrides com. |
| public Object | setAndReturn(Object instance, Object value)
Overrides com. 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 com. |
| _accessor | back to summary |
|---|---|
| protected final AnnotatedMember _accessor Member (field, method) used for accessing existing value. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides com. | |
| 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 IOException Overrides com. Doc from com. 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 IOException Overrides com. Doc from com. Alternative to
| |
| set | back to summary |
|---|---|
| public void set(Object instance, Object value) throws IOException Overrides com. Doc from com. 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(Object instance, Object value) throws IOException Overrides com. Doc from com. 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 com. Doc from com. Method sub-classes must implement, to construct a new instance with given delegate.
| |