Module tools.jackson.databind
Class ManagedReferenceProperty
java.lang.Object
tools.jackson.databind.introspect.ConcreteBeanPropertyBase
tools.jackson.databind.deser.SettableBeanProperty
tools.jackson.databind.deser.SettableBeanProperty.Delegating
tools.jackson.databind.deser.impl.ManagedReferenceProperty
- All Implemented Interfaces:
Named,BeanProperty,FullyNamed
Wrapper property that is used to handle managed (forward) properties
Basically just needs to delegate first to actual forward property, and
then to back property.
-
Nested Class Summary
Nested classes/interfaces inherited from class tools.jackson.databind.deser.SettableBeanProperty
SettableBeanProperty.DelegatingNested classes/interfaces inherited from interface tools.jackson.databind.BeanProperty
BeanProperty.Bogus, BeanProperty.StdNested classes/interfaces inherited from interface tools.jackson.core.util.Named
Named.StringAsNamed -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final SettableBeanPropertyprotected final booleanFlag that indicates whether property to handle is a container type (array, Collection, Map) or not.protected final StringFields inherited from class tools.jackson.databind.deser.SettableBeanProperty.Delegating
delegateFields inherited from class tools.jackson.databind.deser.SettableBeanProperty
_contextAnnotations, _managedReferenceName, _nullProvider, _objectIdInfo, _propertyIndex, _propName, _type, _valueDeserializer, _valueTypeDeserializer, _viewMatcher, _wrapperName, MISSING_VALUE_DESERIALIZERFields inherited from class tools.jackson.databind.introspect.ConcreteBeanPropertyBase
_aliases, _metadataFields inherited from interface tools.jackson.databind.BeanProperty
EMPTY_FORMAT, EMPTY_INCLUDE -
Constructor Summary
ConstructorsConstructorDescriptionManagedReferenceProperty(SettableBeanProperty forward, String refName, SettableBeanProperty backward, boolean isContainer) -
Method Summary
Modifier and TypeMethodDescriptionvoiddeserializeAndSet(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(tools.jackson.core.JsonParser, tools.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.voidfixAccess(DeserializationConfig config) Method called to ensure that the mutator has proper access rights to be called, as per configuration.final voidset(DeserializationContext ctxt, Object instance, Object value) Method called to assign given value to this property, on specified Object.setAndReturn(DeserializationContext ctxt, 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 SettableBeanPropertyMethod sub-classes must implement, to construct a new instance with given delegate.Methods inherited from class tools.jackson.databind.deser.SettableBeanProperty.Delegating
_with, assignIndex, getAnnotation, getCreatorIndex, getDeclaringClass, getDelegate, getInjectableValueId, getManagedReferenceName, getMember, getObjectIdInfo, getPropertyIndex, getValueDeserializer, getValueTypeDeserializer, hasValueDeserializer, hasValueTypeDeserializer, hasViews, isInjectionOnly, visibleInView, withName, withNullProvider, withValueDeserializerMethods inherited from class tools.jackson.databind.deser.SettableBeanProperty
_throwAsJacksonE, _throwAsJacksonE, depositSchemaProperty, deserialize, deserializeWith, getContextAnnotation, getFullName, getInjectionDefinition, getName, getNullValueProvider, getType, getWrapperName, isIgnorable, isMerging, markAsIgnorable, setManagedReferenceName, setObjectIdInfo, setViews, toString, unwrapped, withSimpleNameMethods inherited from class tools.jackson.databind.introspect.ConcreteBeanPropertyBase
findAliases, findFormatOverrides, findPropertyFormat, findPropertyInclusion, getMetadata, isRequired, isVirtualMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface tools.jackson.databind.util.FullyNamed
hasName
-
Field Details
-
_referenceName
-
_isContainer
protected final boolean _isContainerFlag that indicates whether property to handle is a container type (array, Collection, Map) or not. -
_backProperty
-
-
Constructor Details
-
ManagedReferenceProperty
public ManagedReferenceProperty(SettableBeanProperty forward, String refName, SettableBeanProperty backward, boolean isContainer)
-
-
Method Details
-
withDelegate
Description copied from class:SettableBeanProperty.DelegatingMethod sub-classes must implement, to construct a new instance with given delegate.- Specified by:
withDelegatein classSettableBeanProperty.Delegating
-
fixAccess
Description copied from class:SettableBeanPropertyMethod called to ensure that the mutator has proper access rights to be called, as per configuration. Overridden by implementations that have mutators that require access, fields and setters.- Overrides:
fixAccessin classSettableBeanProperty.Delegating
-
deserializeAndSet
public void deserializeAndSet(JsonParser p, DeserializationContext ctxt, Object instance) throws JacksonException Description copied from class:SettableBeanPropertyMethod 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:
deserializeAndSetin classSettableBeanProperty.Delegating- Throws:
JacksonException
-
deserializeSetAndReturn
public Object deserializeSetAndReturn(JsonParser p, DeserializationContext ctxt, Object instance) throws JacksonException Description copied from class:SettableBeanPropertyAlternative toSettableBeanProperty.deserializeAndSet(tools.jackson.core.JsonParser, tools.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:
deserializeSetAndReturnin classSettableBeanProperty.Delegating- Throws:
JacksonException
-
set
Description copied from class:SettableBeanPropertyMethod 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:
setin classSettableBeanProperty.Delegating
-
setAndReturn
Description copied from class:SettableBeanPropertyMethod 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:
setAndReturnin classSettableBeanProperty.Delegating
-