Class MergingSettableBeanProperty
java.lang.Object
edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.databind.introspect.ConcreteBeanPropertyBase
edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.databind.deser.SettableBeanProperty
edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.databind.deser.SettableBeanProperty.Delegating
edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.databind.deser.impl.MergingSettableBeanProperty
- All Implemented Interfaces:
BeanProperty
,Named
,Serializable
SettableBeanProperty
implementation that will try to access value of
the property first, and if non-null value found, pass that for update
(using JsonDeserializer.deserialize(edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.core.JsonParser, edu.internet2.middleware.grouperClientExt.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.
- Since:
- 2.9
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.databind.deser.SettableBeanProperty
SettableBeanProperty.Delegating
Nested classes/interfaces inherited from interface edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.databind.BeanProperty
BeanProperty.Bogus, BeanProperty.Std
-
Field Summary
Modifier and TypeFieldDescriptionprotected final AnnotatedMember
Member (field, method) used for accessing existing value.Fields inherited from class edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.databind.deser.SettableBeanProperty.Delegating
delegate
Fields inherited from class edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.databind.deser.SettableBeanProperty
_contextAnnotations, _managedReferenceName, _nullProvider, _objectIdInfo, _propertyIndex, _propName, _type, _valueDeserializer, _valueTypeDeserializer, _viewMatcher, _wrapperName, MISSING_VALUE_DESERIALIZER
Fields inherited from class edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.databind.introspect.ConcreteBeanPropertyBase
_aliases, _metadata
Fields inherited from interface edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.databind.BeanProperty
EMPTY_FORMAT, EMPTY_INCLUDE
-
Constructor Summary
ModifierConstructorDescriptionprotected
protected
MergingSettableBeanProperty
(SettableBeanProperty delegate, AnnotatedMember accessor) -
Method Summary
Modifier and TypeMethodDescriptionstatic MergingSettableBeanProperty
construct
(SettableBeanProperty delegate, AnnotatedMember accessor) void
deserializeAndSet
(JsonParser p, DeserializationContext ctxt, Object instance) Method called to deserialize appropriate value, given parser (and context), and set it using appropriate mechanism.deserializeSetAndReturn
(JsonParser p, DeserializationContext ctxt, Object instance) Alternative toSettableBeanProperty.deserializeAndSet(edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.core.JsonParser, edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.databind.DeserializationContext, java.lang.Object)
that returns either return value of setter method called (if one is), or null to indicate that no return value is available.void
Method called to assign given value to this property, on specified Object.setAndReturn
(Object instance, Object value) Method called to assign given value to this property, on specified Object, and return whatever delegating accessor returned (if anything)protected SettableBeanProperty
Method sub-classes must implement, to construct a new instance with given delegate.Methods inherited from class edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.databind.deser.SettableBeanProperty.Delegating
_with, assignIndex, fixAccess, getAnnotation, getCreatorIndex, getDeclaringClass, getDelegate, getInjectableValueId, getManagedReferenceName, getMember, getObjectIdInfo, getPropertyIndex, getValueDeserializer, getValueTypeDeserializer, hasValueDeserializer, hasValueTypeDeserializer, hasViews, isInjectionOnly, visibleInView, withName, withNullProvider, withValueDeserializer
Methods inherited from class edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.databind.deser.SettableBeanProperty
_throwAsIOE, _throwAsIOE, _throwAsIOE, _throwAsIOE, depositSchemaProperty, deserialize, deserializeWith, getContextAnnotation, getFullName, getName, getNullValueProvider, getType, getWrapperName, isIgnorable, markAsIgnorable, setManagedReferenceName, setObjectIdInfo, setViews, toString, withSimpleName
Methods inherited from class edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.databind.introspect.ConcreteBeanPropertyBase
findAliases, findFormatOverrides, findPropertyFormat, findPropertyInclusion, getMetadata, isRequired, isVirtual
-
Field Details
-
_accessor
Member (field, method) used for accessing existing value.
-
-
Constructor Details
-
MergingSettableBeanProperty
-
MergingSettableBeanProperty
protected MergingSettableBeanProperty(MergingSettableBeanProperty src, SettableBeanProperty delegate)
-
-
Method Details
-
construct
public static MergingSettableBeanProperty construct(SettableBeanProperty delegate, AnnotatedMember accessor) -
withDelegate
Description copied from class:SettableBeanProperty.Delegating
Method sub-classes must implement, to construct a new instance with given delegate.- Specified by:
withDelegate
in classSettableBeanProperty.Delegating
-
deserializeAndSet
public void deserializeAndSet(JsonParser p, DeserializationContext ctxt, Object instance) throws IOException Description copied from class:SettableBeanProperty
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).- Overrides:
deserializeAndSet
in classSettableBeanProperty.Delegating
- Throws:
IOException
-
deserializeSetAndReturn
public Object deserializeSetAndReturn(JsonParser p, DeserializationContext ctxt, Object instance) throws IOException Description copied from class:SettableBeanProperty
Alternative toSettableBeanProperty.deserializeAndSet(edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.core.JsonParser, edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.databind.DeserializationContext, java.lang.Object)
that returns either return value of setter method called (if one is), or null to indicate that no return value is available. Mostly used to support Builder style deserialization.- Overrides:
deserializeSetAndReturn
in classSettableBeanProperty.Delegating
- Throws:
IOException
-
set
Description copied from class:SettableBeanProperty
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.
- Overrides:
set
in classSettableBeanProperty.Delegating
- Throws:
IOException
-
setAndReturn
Description copied from class:SettableBeanProperty
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.
- Overrides:
setAndReturn
in classSettableBeanProperty.Delegating
- Throws:
IOException
-