com.fasterxml.jackson.databind.deser.impl

## Class PropertyBasedCreator

- java.lang.Object
- - com.fasterxml.jackson.databind.deser.impl.PropertyBasedCreator

-     public final class PropertyBasedCreator
      extends java.lang.Object

  Object that is used to collect arguments for non-default creator (non-default-constructor, or argument-taking factory method) before creator can be called. Since ordering of JSON properties is not guaranteed, this may require buffering of values other than ones being passed to creator.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected SettableBeanProperty[]` | `_allProperties` Array that contains properties that expect value to inject, if any; null if no injectable values are expected.
    `protected int` | `_propertyCount` Number of properties: usually same as size of `_propertyLookup`, but not necessarily, when we have unnamed injectable properties.
    `protected java.util.HashMap<java.lang.String,SettableBeanProperty>` | `_propertyLookup` Map that contains property objects for either constructor or factory method (whichever one is null: one property for each parameter for that one), keyed by logical property name
    `protected ValueInstantiator` | `_valueInstantiator` Helper object that knows how to actually construct the instance by invoking creator method with buffered arguments.

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `PropertyBasedCreator(ValueInstantiator valueInstantiator, SettableBeanProperty[] creatorProps, boolean caseInsensitive)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `build(DeserializationContext ctxt, PropertyValueBuffer buffer)`
    `static PropertyBasedCreator` | `construct(DeserializationContext ctxt, ValueInstantiator valueInstantiator, SettableBeanProperty[] srcProps)` Factory method used for building actual instances: resolves deserializers and checks for "null values".
    `SettableBeanProperty` | `findCreatorProperty(int propertyIndex)`
    `SettableBeanProperty` | `findCreatorProperty(java.lang.String name)`
    `java.util.Collection<SettableBeanProperty>` | `properties()`
    `PropertyValueBuffer` | `startBuilding(com.fasterxml.jackson.core.JsonParser p, DeserializationContext ctxt, ObjectIdReader oir)` Method called when starting to build a bean instance.

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

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

- - ### Field Detail

    - #### _propertyCount

          protected final int _propertyCount

      Number of properties: usually same as size of `_propertyLookup`, but not necessarily, when we have unnamed injectable properties.

    - #### _valueInstantiator

          protected final ValueInstantiator _valueInstantiator

      Helper object that knows how to actually construct the instance by invoking creator method with buffered arguments.

    - #### _propertyLookup

          protected final java.util.HashMap<java.lang.String,SettableBeanProperty> _propertyLookup

      Map that contains property objects for either constructor or factory method (whichever one is null: one property for each parameter for that one), keyed by logical property name

    - #### _allProperties

          protected final SettableBeanProperty[] _allProperties

      Array that contains properties that expect value to inject, if any; null if no injectable values are expected.

  - ### Constructor Detail

    - #### PropertyBasedCreator

          protected PropertyBasedCreator(ValueInstantiator valueInstantiator,
                              SettableBeanProperty[] creatorProps,
                              boolean caseInsensitive)

  - ### Method Detail

    - #### construct

          public static PropertyBasedCreator construct(DeserializationContext ctxt,
                                       ValueInstantiator valueInstantiator,
                                       SettableBeanProperty[] srcProps)
                                                throws JsonMappingException

      Factory method used for building actual instances: resolves deserializers and checks for "null values".
      Throws:
        `JsonMappingException`

    - #### properties

          public java.util.Collection<SettableBeanProperty> properties()

    - #### findCreatorProperty

          public SettableBeanProperty findCreatorProperty(java.lang.String name)

    - #### findCreatorProperty

          public SettableBeanProperty findCreatorProperty(int propertyIndex)

    - #### startBuilding

          public PropertyValueBuffer startBuilding(com.fasterxml.jackson.core.JsonParser p,
                                          DeserializationContext ctxt,
                                          ObjectIdReader oir)

      Method called when starting to build a bean instance.
      Since:
        2.1 (added ObjectIdReader parameter -- existed in previous versions without)

    - #### build

          public java.lang.Object build(DeserializationContext ctxt,
                               PropertyValueBuffer buffer)
                                 throws java.io.IOException

      Throws:
        `java.io.IOException`