Class SettableBeanPropertyDelegating

  • All Implemented Interfaces:
    com.fasterxml.jackson.databind.BeanProperty, com.fasterxml.jackson.databind.util.Named, Serializable

    public class SettableBeanPropertyDelegating
    extends com.fasterxml.jackson.databind.deser.SettableBeanProperty.Delegating
    This concrete subclass encapsulates a SettableBeanProperty delegate that is always tried first.

    A fall-back mechanism is implemented in the deserializeAndSet methods to allow field values that don't match the target type to be preserved in the anySetter method if exists.

    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.deser.SettableBeanProperty

        com.fasterxml.jackson.databind.deser.SettableBeanProperty.Delegating
      • Nested classes/interfaces inherited from interface com.fasterxml.jackson.databind.BeanProperty

        com.fasterxml.jackson.databind.BeanProperty.Bogus, com.fasterxml.jackson.databind.BeanProperty.Std
    • Field Summary

      • Fields inherited from class com.fasterxml.jackson.databind.deser.SettableBeanProperty.Delegating

        delegate
      • Fields inherited from class com.fasterxml.jackson.databind.deser.SettableBeanProperty

        _contextAnnotations, _managedReferenceName, _nullProvider, _objectIdInfo, _propertyIndex, _propName, _type, _valueDeserializer, _valueTypeDeserializer, _viewMatcher, _wrapperName, MISSING_VALUE_DESERIALIZER
      • Fields inherited from class com.fasterxml.jackson.databind.introspect.ConcreteBeanPropertyBase

        _aliases, _metadata
      • Fields inherited from interface com.fasterxml.jackson.databind.BeanProperty

        EMPTY_FORMAT, EMPTY_INCLUDE
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void depositSchemaProperty​(com.fasterxml.jackson.databind.jsonFormatVisitors.JsonObjectFormatVisitor objectVisitor, com.fasterxml.jackson.databind.SerializerProvider provider)
      void deserializeAndSet​(com.fasterxml.jackson.core.JsonParser p, com.fasterxml.jackson.databind.DeserializationContext ctxt, Object instance)
      Method called to deserialize appropriate value, given parser (and context), and set it using appropriate mechanism.
      Object deserializeSetAndReturn​(com.fasterxml.jackson.core.JsonParser p, com.fasterxml.jackson.databind.DeserializationContext ctxt, Object instance)
      <A extends Annotation>
      A
      getContextAnnotation​(Class<A> acls)
      com.fasterxml.jackson.databind.PropertyName getFullName()
      com.fasterxml.jackson.databind.deser.NullValueProvider getNullValueProvider()
      com.fasterxml.jackson.databind.JavaType getType()
      com.fasterxml.jackson.databind.PropertyName getWrapperName()
      boolean isIgnorable()
      void markAsIgnorable()
      void setManagedReferenceName​(String n)
      void setObjectIdInfo​(com.fasterxml.jackson.databind.introspect.ObjectIdInfo objectIdInfo)
      void setViews​(Class<?>[] views)
      String toString()
      protected com.fasterxml.jackson.databind.deser.SettableBeanProperty withDelegate​(com.fasterxml.jackson.databind.deser.SettableBeanProperty d)
      com.fasterxml.jackson.databind.deser.SettableBeanProperty withSimpleName​(String simpleName)
      • Methods inherited from class 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, set, setAndReturn, visibleInView, withName, withNullProvider, withValueDeserializer
      • Methods inherited from class com.fasterxml.jackson.databind.deser.SettableBeanProperty

        _throwAsIOE, _throwAsIOE, _throwAsIOE, _throwAsIOE, deserialize, deserializeWith, getName
      • Methods inherited from class com.fasterxml.jackson.databind.introspect.ConcreteBeanPropertyBase

        findAliases, findFormatOverrides, findPropertyFormat, findPropertyInclusion, getMetadata, isRequired, isVirtual
    • Method Detail

      • withDelegate

        protected com.fasterxml.jackson.databind.deser.SettableBeanProperty withDelegate​(com.fasterxml.jackson.databind.deser.SettableBeanProperty d)
        Specified by:
        withDelegate in class com.fasterxml.jackson.databind.deser.SettableBeanProperty.Delegating
      • markAsIgnorable

        public void markAsIgnorable()
        Overrides:
        markAsIgnorable in class com.fasterxml.jackson.databind.deser.SettableBeanProperty
      • isIgnorable

        public boolean isIgnorable()
        Overrides:
        isIgnorable in class com.fasterxml.jackson.databind.deser.SettableBeanProperty
      • setViews

        public void setViews​(Class<?>[] views)
        Overrides:
        setViews in class com.fasterxml.jackson.databind.deser.SettableBeanProperty
      • getContextAnnotation

        public <A extends Annotation> A getContextAnnotation​(Class<A> acls)
        Specified by:
        getContextAnnotation in interface com.fasterxml.jackson.databind.BeanProperty
        Overrides:
        getContextAnnotation in class com.fasterxml.jackson.databind.deser.SettableBeanProperty
      • getWrapperName

        public com.fasterxml.jackson.databind.PropertyName getWrapperName()
        Specified by:
        getWrapperName in interface com.fasterxml.jackson.databind.BeanProperty
        Overrides:
        getWrapperName in class com.fasterxml.jackson.databind.deser.SettableBeanProperty
      • getNullValueProvider

        public com.fasterxml.jackson.databind.deser.NullValueProvider getNullValueProvider()
        Overrides:
        getNullValueProvider in class com.fasterxml.jackson.databind.deser.SettableBeanProperty
      • depositSchemaProperty

        public void depositSchemaProperty​(com.fasterxml.jackson.databind.jsonFormatVisitors.JsonObjectFormatVisitor objectVisitor,
                                          com.fasterxml.jackson.databind.SerializerProvider provider)
                                   throws com.fasterxml.jackson.databind.JsonMappingException
        Specified by:
        depositSchemaProperty in interface com.fasterxml.jackson.databind.BeanProperty
        Overrides:
        depositSchemaProperty in class com.fasterxml.jackson.databind.deser.SettableBeanProperty
        Throws:
        com.fasterxml.jackson.databind.JsonMappingException
      • getType

        public com.fasterxml.jackson.databind.JavaType getType()
        Specified by:
        getType in interface com.fasterxml.jackson.databind.BeanProperty
        Overrides:
        getType in class com.fasterxml.jackson.databind.deser.SettableBeanProperty
      • getFullName

        public com.fasterxml.jackson.databind.PropertyName getFullName()
        Specified by:
        getFullName in interface com.fasterxml.jackson.databind.BeanProperty
        Overrides:
        getFullName in class com.fasterxml.jackson.databind.deser.SettableBeanProperty
      • setManagedReferenceName

        public void setManagedReferenceName​(String n)
        Overrides:
        setManagedReferenceName in class com.fasterxml.jackson.databind.deser.SettableBeanProperty
      • withSimpleName

        public com.fasterxml.jackson.databind.deser.SettableBeanProperty withSimpleName​(String simpleName)
        Overrides:
        withSimpleName in class com.fasterxml.jackson.databind.deser.SettableBeanProperty
      • setObjectIdInfo

        public void setObjectIdInfo​(com.fasterxml.jackson.databind.introspect.ObjectIdInfo objectIdInfo)
        Overrides:
        setObjectIdInfo in class com.fasterxml.jackson.databind.deser.SettableBeanProperty
      • toString

        public String toString()
        Overrides:
        toString in class com.fasterxml.jackson.databind.deser.SettableBeanProperty
      • deserializeAndSet

        public void deserializeAndSet​(com.fasterxml.jackson.core.JsonParser p,
                                      com.fasterxml.jackson.databind.DeserializationContext ctxt,
                                      Object instance)
                               throws IOException
        Method called to deserialize appropriate value, given parser (and context), and set it using appropriate mechanism.

        Deserialization is first tried through the delegate. In case a MismatchedInputException is caught, the field is stored in the bean's SettableAnyProperty anySetter field if it exists.

        This allows deserialization processes propagate values that initially don't match the target bean type for the applicable field.

        An example use-case is the use of placeholders (e.g. ${aValue}) in a field.

        Overrides:
        deserializeAndSet in class com.fasterxml.jackson.databind.deser.SettableBeanProperty.Delegating
        Throws:
        IOException
      • deserializeSetAndReturn

        public Object deserializeSetAndReturn​(com.fasterxml.jackson.core.JsonParser p,
                                              com.fasterxml.jackson.databind.DeserializationContext ctxt,
                                              Object instance)
                                       throws IOException
        Overrides:
        deserializeSetAndReturn in class com.fasterxml.jackson.databind.deser.SettableBeanProperty.Delegating
        Throws:
        IOException