SettableAnyProperty
Date: 2016-12-04

com.fasterxml.jackson.databind.deser

## Class SettableAnyProperty

- java.lang.Object
- - com.fasterxml.jackson.databind.deser.SettableAnyProperty

- All Implemented Interfaces:
    java.io.Serializable

      public class SettableAnyProperty
      extends java.lang.Object
      implements java.io.Serializable

  Class that represents a "wildcard" set method which can be used to generically set values of otherwise unmapped (aka "unknown") properties read from Json content.

  !!! Note: might make sense to refactor to share some code with `SettableBeanProperty`?

  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected BeanProperty` | `_property` Method used for setting "any" properties, along with annotation information.
    `protected AnnotatedMember` | `_setter` Annotated variant is needed for JDK serialization only
    `protected JavaType` | `_type`
    `protected JsonDeserializer<java.lang.Object>` | `_valueDeserializer`
    `protected TypeDeserializer` | `_valueTypeDeserializer`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `` | `SettableAnyProperty(BeanProperty property, AnnotatedMember setter, JavaType type, JsonDeserializer<java.lang.Object> valueDeser, TypeDeserializer typeDeser)`
    `protected` | `SettableAnyProperty(SettableAnyProperty src)` Constructor used for JDK Serialization when reading persisted object

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `_throwAsIOE(java.lang.Exception e, java.lang.String propName, java.lang.Object value)`
    `java.lang.Object` | `deserialize(com.fasterxml.jackson.core.JsonParser p, DeserializationContext ctxt)`
    `void` | `deserializeAndSet(com.fasterxml.jackson.core.JsonParser p, DeserializationContext ctxt, java.lang.Object instance, java.lang.String propName)` Method called to deserialize appropriate value, given parser (and context), and set it using appropriate method (a setter method).
    `void` | `fixAccess(DeserializationConfig config)`
    `BeanProperty` | `getProperty()`
    `JavaType` | `getType()`
    `boolean` | `hasValueDeserializer()`
    `void` | `set(java.lang.Object instance, java.lang.String propName, java.lang.Object value)`
    `java.lang.String` | `toString()`
    `SettableAnyProperty` | `withValueDeserializer(JsonDeserializer<java.lang.Object> deser)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### _property

          protected final BeanProperty _property

      Method used for setting "any" properties, along with annotation information. Retained to allow contextualization of any properties.

    - #### _setter

          protected final AnnotatedMember _setter

      Annotated variant is needed for JDK serialization only

    - #### _type

          protected final JavaType _type

    - #### _valueDeserializer

          protected JsonDeserializer<java.lang.Object> _valueDeserializer

    - #### _valueTypeDeserializer

          protected final TypeDeserializer _valueTypeDeserializer

  - ### Constructor Detail

    - #### SettableAnyProperty

          public SettableAnyProperty(BeanProperty property,
                             AnnotatedMember setter,
                             JavaType type,
                             JsonDeserializer<java.lang.Object> valueDeser,
                             TypeDeserializer typeDeser)

    - #### SettableAnyProperty

          protected SettableAnyProperty(SettableAnyProperty src)

      Constructor used for JDK Serialization when reading persisted object

  - ### Method Detail

    - #### withValueDeserializer

          public SettableAnyProperty withValueDeserializer(JsonDeserializer<java.lang.Object> deser)

    - #### fixAccess

          public void fixAccess(DeserializationConfig config)

    - #### getProperty

          public BeanProperty getProperty()

    - #### hasValueDeserializer

          public boolean hasValueDeserializer()

    - #### getType

          public JavaType getType()

    - #### deserializeAndSet

          public final void deserializeAndSet(com.fasterxml.jackson.core.JsonParser p,
                               DeserializationContext ctxt,
                               java.lang.Object instance,
                               java.lang.String propName)
                                       throws java.io.IOException

      Method called to deserialize appropriate value, given parser (and context), and set it using appropriate method (a setter method).
      Throws:
        `java.io.IOException`

    - #### deserialize

          public java.lang.Object deserialize(com.fasterxml.jackson.core.JsonParser p,
                                     DeserializationContext ctxt)
                                       throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### set

          public void set(java.lang.Object instance,
                 java.lang.String propName,
                 java.lang.Object value)
                   throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### _throwAsIOE

          protected void _throwAsIOE(java.lang.Exception e,
                         java.lang.String propName,
                         java.lang.Object value)
                              throws java.io.IOException

      Parameters:
        `e` - Exception to re-throw or wrap
        `propName` - Name of property (from Json input) to set
        `value` - Value of the property
      Throws:
        `java.io.IOException`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`