com.fasterxml.jackson.databind.deser.impl

## Class PropertyValueBuffer

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

    public class PropertyValueBuffer
    extends Object

Simple container used for temporarily buffering a set of `PropertyValue`s. Using during construction of beans (and Maps) that use Creators, and hence need buffering before instance (that will have properties to assign values to) is constructed.

### Field Summary

Fields
`protected PropertyValue` `_anyParamBuffered` If "Any-setter-via-Creator" exists, we will need to buffer values to feed it, separate from regular, non-creator properties (see `_buffered`).
`protected SettableAnyProperty` `_anyParamSetter` "Any setter" property bound to a Creator parameter (via `@JsonAnySetter`).
`protected PropertyValue` `_buffered` If we get non-creator parameters before or between creator parameters, those need to be buffered.
`protected DeserializationContext` `_context`
`protected Object[]` `_creatorParameters` Buffer used for storing creator parameters for constructing instance.
`protected Object` `_idValue` In case there is an Object Id property to handle, this is the value we have for it.
`protected BitSet` `_injectablePropIndexes` Indexes properties that are injectable, if any; `null` if none, cleared as they are injected.
`protected ObjectIdReader` `_objectIdReader`
`protected int` `_paramsNeeded` Number of creator parameters for which we have not yet received values.
`protected int` `_paramsSeen` Bitflag used to track parameters found from incoming data when number of parameters is less than 32 (fits in int).
`protected BitSet` `_paramsSeenBig` Bitflag used to track parameters found from incoming data when number of parameters is 32 or higher.
`protected JsonParser` `_parser`

### Constructor Summary

Constructors
Constructor and Description
`PropertyValueBuffer(JsonParser p, DeserializationContext ctxt, int paramCount, ObjectIdReader oir, SettableAnyProperty anyParamSetter)` Deprecated.
`PropertyValueBuffer(JsonParser p, DeserializationContext ctxt, int paramCount, ObjectIdReader oir, SettableAnyProperty anyParamSetter, BitSet injectablePropIndexes)`

### Method Summary

All Methods Instance Methods Concrete Methods
`protected Object` `_findMissing(SettableBeanProperty prop)`
`boolean` `assignParameter(SettableBeanProperty prop, Object value)` Method called to buffer value for given property, as well as check whether we now have values for all (creator) properties that we expect to get values for.
`void` `bufferAnyParameterProperty(SettableAnyProperty prop, String propName, Object value)`
`void` `bufferAnyProperty(SettableAnyProperty prop, String propName, Object value)`
`protected PropertyValue` `buffered()`
`void` `bufferMapProperty(Object key, Object value)`
`void` `bufferMergingProperty(SettableBeanProperty prop, TokenBuffer buffered)`
`void` `bufferProperty(SettableBeanProperty prop, Object value)`
`Object` `getParameter(SettableBeanProperty prop)` A variation of `getParameters(SettableBeanProperty[])` that accepts a single property.
`Object[]` `getParameters(SettableBeanProperty[] props)` Method called to do necessary post-processing such as injection of values and verification of values for required properties, after either `assignParameter(SettableBeanProperty, Object)` returns `true` (to indicate all creator properties are found), or when the whole JSON Object has been processed,
`Object` `handleIdValue(DeserializationContext ctxt, Object bean)` Helper method called to handle Object Id value collected earlier, if any
`boolean` `hasParameter(SettableBeanProperty prop)` Returns `true` if the given property was seen in the JSON source by this buffer.
`boolean` `isComplete()`
`boolean` `readIdProperty(String propName)` Helper method called to see if given non-creator property is the "id property"; and if so, handle appropriately.

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

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

### Field Detail

#### _parser

    protected final JsonParser _parser

#### _context

    protected final DeserializationContext _context

#### _objectIdReader

    protected final ObjectIdReader _objectIdReader

#### _creatorParameters

    protected final Object[] _creatorParameters

Buffer used for storing creator parameters for constructing instance.

#### _paramsNeeded

    protected int _paramsNeeded

Number of creator parameters for which we have not yet received values.

#### _paramsSeen

    protected int _paramsSeen

Bitflag used to track parameters found from incoming data when number of parameters is less than 32 (fits in int).

#### _paramsSeenBig

    protected final BitSet _paramsSeenBig

Bitflag used to track parameters found from incoming data when number of parameters is 32 or higher.

#### _buffered

    protected PropertyValue _buffered

If we get non-creator parameters before or between creator parameters, those need to be buffered. Buffer is just a simple linked list.

#### _idValue

    protected Object _idValue

In case there is an Object Id property to handle, this is the value we have for it.

#### _anyParamSetter

    protected final SettableAnyProperty _anyParamSetter

"Any setter" property bound to a Creator parameter (via `@JsonAnySetter`).

Since:
  2.18

#### _anyParamBuffered

    protected PropertyValue _anyParamBuffered

If "Any-setter-via-Creator" exists, we will need to buffer values to feed it, separate from regular, non-creator properties (see `_buffered`).

Since:
  2.18

#### _injectablePropIndexes

    protected final BitSet _injectablePropIndexes

Indexes properties that are injectable, if any; `null` if none, cleared as they are injected.

Since:
  2.21

### Constructor Detail

#### PropertyValueBuffer

    public PropertyValueBuffer(JsonParser p,
                               DeserializationContext ctxt,
                               int paramCount,
                               ObjectIdReader oir,
                               SettableAnyProperty anyParamSetter,
                               BitSet injectablePropIndexes)

Since:
  2.21

#### PropertyValueBuffer

    @Deprecated
    public PropertyValueBuffer(JsonParser p,
                                           DeserializationContext ctxt,
                                           int paramCount,
                                           ObjectIdReader oir,
                                           SettableAnyProperty anyParamSetter)

Deprecated.

### Method Detail

#### hasParameter

    public final boolean hasParameter(SettableBeanProperty prop)

Returns `true` if the given property was seen in the JSON source by this buffer.

Since:
  2.8

#### getParameter

    public Object getParameter(SettableBeanProperty prop)
                        throws JsonMappingException

A variation of `getParameters(SettableBeanProperty[])` that accepts a single property. Whereas the plural form eagerly fetches and validates all properties, this method may be used (along with `hasParameter(SettableBeanProperty)`) to let applications only fetch the properties defined in the JSON source itself, and to have some other customized behavior for missing properties.

Throws:
  `JsonMappingException`
Since:
  2.8

#### getParameters

    public Object[] getParameters(SettableBeanProperty[] props)
                           throws JsonMappingException,
                                  IOException

Method called to do necessary post-processing such as injection of values and verification of values for required properties, after either `assignParameter(SettableBeanProperty, Object)` returns `true` (to indicate all creator properties are found), or when the whole JSON Object has been processed,

Throws:
  `JsonMappingException`
  `IOException`

#### _findMissing

    protected Object _findMissing(SettableBeanProperty prop)
                           throws JsonMappingException

Throws:
  `JsonMappingException`

#### readIdProperty

    public boolean readIdProperty(String propName)
                           throws IOException

Helper method called to see if given non-creator property is the "id property"; and if so, handle appropriately.

Throws:
  `IOException`
Since:
  2.1

#### handleIdValue

    public Object handleIdValue(DeserializationContext ctxt,
                                Object bean)
                         throws IOException

Helper method called to handle Object Id value collected earlier, if any

Throws:
  `IOException`

#### buffered

    protected PropertyValue buffered()

#### isComplete

    public boolean isComplete()

#### assignParameter

    public boolean assignParameter(SettableBeanProperty prop,
                                   Object value)

Method called to buffer value for given property, as well as check whether we now have values for all (creator) properties that we expect to get values for.

Returns:
  True if we have received all creator parameters
Since:
  2.6

#### bufferProperty

    public void bufferProperty(SettableBeanProperty prop,
                               Object value)

#### bufferAnyProperty

    public void bufferAnyProperty(SettableAnyProperty prop,
                                  String propName,
                                  Object value)

#### bufferMapProperty

    public void bufferMapProperty(Object key,
                                  Object value)

#### bufferAnyParameterProperty

    public void bufferAnyParameterProperty(SettableAnyProperty prop,
                                           String propName,
                                           Object value)

#### bufferMergingProperty

    public void bufferMergingProperty(SettableBeanProperty prop,
                                      TokenBuffer buffered)