Top Description Inners Fields Constructors Methods
tools.jackson.databind.deser.impl

public final Class MethodProperty

extends SettableBeanProperty
Class Inheritance
Imports
java.lang.annotation.Annotation, java.lang.invoke.MethodHandle, .MethodHandles, .MethodType, tools.jackson.core.JacksonException, .JsonParser, .JsonToken, tools.jackson.databind.*, tools.jackson.databind.deser.NullValueProvider, .SettableBeanProperty, tools.jackson.databind.introspect.*, tools.jackson.databind.jsontype.TypeDeserializer, tools.jackson.databind.util.Annotations, tools.jackson.databind.util.internal.UnreflectHandleSupplier

This concrete sub-class implements property that is set using a MethodHandle to the setter, which is either a setter method or a field setter.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class

Field Summary

Modifier and TypeField and Description
protected final AnnotatedMember
protected final MethodProperty.SetterHolder
_setter

Setter MethodHandle holder for modifying property value.

protected final MethodProperty.SetterHolder
_setterReturn

Setter MethodHandle holder for modifying property value and returning the modified bean.

protected final boolean
Inherited from tools.jackson.databind.deser.SettableBeanProperty:
_contextAnnotations_managedReferenceName_nullProvider_objectIdInfo_propertyIndex_propName_type_valueDeserializer_valueTypeDeserializer_viewMatcher_wrapperNameMISSING_VALUE_DESERIALIZER

Constructor Summary

AccessConstructor and Description
public
MethodProperty(BeanPropertyDefinition propDef, JavaType type, TypeDeserializer typeDeser, Annotations contextAnnotations, AnnotatedMember annotated)

protected
protected

Method Summary

Modifier and TypeMethod and Description
public void
deserializeAndSet(JsonParser p, DeserializationContext ctxt, Object instance)

Implements abstract tools.jackson.databind.deser.SettableBeanProperty.deserializeAndSet.

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)

Implements abstract tools.jackson.databind.deser.SettableBeanProperty.deserializeSetAndReturn.

Alternative to 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
fixAccess(DeserializationConfig config)

Overrides tools.jackson.databind.deser.SettableBeanProperty.fixAccess.

Method called to ensure that the mutator has proper access rights to be called, as per configuration.

public <A extends Annotation> A
getAnnotation(Class<A> acls)

Implements abstract tools.jackson.databind.deser.SettableBeanProperty.getAnnotation.

Implements tools.jackson.databind.BeanProperty.getAnnotation.

Method for finding annotation associated with this property; meaning annotation associated with one of entities used to access property.

public AnnotatedMember
getMember()

Implements abstract tools.jackson.databind.deser.SettableBeanProperty.getMember.

Implements tools.jackson.databind.BeanProperty.getMember.

Method for accessing primary physical entity that represents the property; annotated field, method or constructor property.

public final void
set(DeserializationContext ctxt, Object instance, Object value)

Implements abstract tools.jackson.databind.deser.SettableBeanProperty.set.

Method called to assign given value to this property, on specified Object.

public Object
setAndReturn(DeserializationContext ctxt, Object instance, Object value)

Implements abstract tools.jackson.databind.deser.SettableBeanProperty.setAndReturn.

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.

public SettableBeanProperty
withName(PropertyName newName)

Implements abstract tools.jackson.databind.deser.SettableBeanProperty.withName.

Fluent factory method for constructing and returning a new instance with specified property name.

public SettableBeanProperty
public SettableBeanProperty
withValueDeserializer(ValueDeserializer<?> deser)

Implements abstract tools.jackson.databind.deser.SettableBeanProperty.withValueDeserializer.

Fluent factory method for constructing and returning a new instance with specified value deserializer.

Inherited from tools.jackson.databind.deser.SettableBeanProperty:
_throwAsJacksonE_throwAsJacksonEassignIndexdepositSchemaPropertydeserializedeserializeWithgetContextAnnotationgetCreatorIndexgetDeclaringClassgetFullNamegetInjectableValueIdgetManagedReferenceNamegetNamegetNullValueProvidergetObjectIdInfogetPropertyIndexgetTypegetValueDeserializergetValueTypeDeserializergetWrapperNamehasValueDeserializerhasValueTypeDeserializerhasViewsisIgnorableisInjectionOnlyisMergingmarkAsIgnorablesetManagedReferenceNamesetObjectIdInfosetViewstoStringunwrappedvisibleInViewwithSimpleName

Field Detail

_annotatedback to summary
protected final AnnotatedMember _annotated
_setterback to summary
protected final MethodProperty.SetterHolder _setter

Setter MethodHandle holder for modifying property value.

_setterReturnback to summary
protected final MethodProperty.SetterHolder _setterReturn

Setter MethodHandle holder for modifying property value and returning the modified bean.

_skipNullsback to summary
protected final boolean _skipNulls

Constructor Detail

MethodPropertyback to summary
public MethodProperty(BeanPropertyDefinition propDef, JavaType type, TypeDeserializer typeDeser, Annotations contextAnnotations, AnnotatedMember annotated)
MethodPropertyback to summary
protected MethodProperty(MethodProperty src, ValueDeserializer<?> deser, NullValueProvider nva)
MethodPropertyback to summary
protected MethodProperty(MethodProperty src, PropertyName newName)

Method Detail

deserializeAndSetback to summary
public void deserializeAndSet(JsonParser p, DeserializationContext ctxt, Object instance) throws JacksonException

Implements abstract tools.jackson.databind.deser.SettableBeanProperty.deserializeAndSet.

Doc from tools.jackson.databind.deser.SettableBeanProperty.deserializeAndSet.

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).

Annotations
@Override
deserializeSetAndReturnback to summary
public Object deserializeSetAndReturn(JsonParser p, DeserializationContext ctxt, Object instance) throws JacksonException

Implements abstract tools.jackson.databind.deser.SettableBeanProperty.deserializeSetAndReturn.

Doc from tools.jackson.databind.deser.SettableBeanProperty.deserializeSetAndReturn.

Alternative to deserializeAndSet 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.

Annotations
@Override
fixAccessback to summary
public void fixAccess(DeserializationConfig config)

Overrides tools.jackson.databind.deser.SettableBeanProperty.fixAccess.

Doc from tools.jackson.databind.deser.SettableBeanProperty.fixAccess.

Method 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.

Annotations
@Override
getAnnotationback to summary
public <A extends Annotation> A getAnnotation(Class<A> acls)

Implements abstract tools.jackson.databind.deser.SettableBeanProperty.getAnnotation.

Implements tools.jackson.databind.BeanProperty.getAnnotation.

Doc from tools.jackson.databind.BeanProperty.getAnnotation.

Method for finding annotation associated with this property; meaning annotation associated with one of entities used to access property.

Note that this method should only be called for custom annotations; access to standard Jackson annotations (or ones supported by alternate AnnotationIntrospectors) should be accessed through AnnotationIntrospector.

Annotations
@Override
getMemberback to summary
public AnnotatedMember getMember()

Implements abstract tools.jackson.databind.deser.SettableBeanProperty.getMember.

Implements tools.jackson.databind.BeanProperty.getMember.

Doc from tools.jackson.databind.BeanProperty.getMember.

Method for accessing primary physical entity that represents the property; annotated field, method or constructor property.

Annotations
@Override
setback to summary
public final void set(DeserializationContext ctxt, Object instance, Object value) throws JacksonException

Implements abstract tools.jackson.databind.deser.SettableBeanProperty.set.

Doc from tools.jackson.databind.deser.SettableBeanProperty.set.

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.

Annotations
@Override
setAndReturnback to summary
public Object setAndReturn(DeserializationContext ctxt, Object instance, Object value) throws JacksonException

Implements abstract tools.jackson.databind.deser.SettableBeanProperty.setAndReturn.

Doc from tools.jackson.databind.deser.SettableBeanProperty.setAndReturn.

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.

Annotations
@Override
withNameback to summary
public SettableBeanProperty withName(PropertyName newName)

Implements abstract tools.jackson.databind.deser.SettableBeanProperty.withName.

Doc from tools.jackson.databind.deser.SettableBeanProperty.withName.

Fluent factory method for constructing and returning a new instance with specified property name. Note that this method should NOT change configuration of this instance.

Annotations
@Override
withNullProviderback to summary
public SettableBeanProperty withNullProvider(NullValueProvider nva)

Implements abstract tools.jackson.databind.deser.SettableBeanProperty.withNullProvider.

Annotations
@Override
withValueDeserializerback to summary
public SettableBeanProperty withValueDeserializer(ValueDeserializer<?> deser)

Implements abstract tools.jackson.databind.deser.SettableBeanProperty.withValueDeserializer.

Doc from tools.jackson.databind.deser.SettableBeanProperty.withValueDeserializer.

Fluent factory method for constructing and returning a new instance with specified value deserializer. Note that this method should NOT change configuration of this instance.

Annotations
@Override
tools.jackson.databind.deser.impl back to summary

pack-priv Class MethodProperty.SetterHolder

extends UnreflectHandleSupplier
Class Inheritance

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
protected MethodHandle
Inherited from tools.jackson.databind.util.internal.UnreflectHandleSupplier:
getpostprocesstoString

Constructor Detail

SetterHolderback to summary
pack-priv SetterHolder(MethodType asType)

Method Detail

unreflectback to summary
protected MethodHandle unreflect() throws IllegalAccessException

Implements abstract tools.jackson.databind.util.internal.UnreflectHandleSupplier.unreflect.

Annotations
@Override