com.fasterxml.jackson.databind.deser.impl

## Class BeanPropertyMap

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

- All Implemented Interfaces:
    Serializable, Iterable<SettableBeanProperty>

      public final class BeanPropertyMap
      extends Object
      implements Iterable<SettableBeanProperty>, Serializable

  Helper class used for storing mapping from property name to `SettableBeanProperty` instances.

  Note that this class is used instead of generic `HashMap` for bit of performance gain (and some memory savings): although default implementation is very good for generic use cases, it can be streamlined a bit for specific use case we have. Even relatively small improvements matter since this is directly on the critical path during deserialization, as it is done for each and every POJO property deserialized.

  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BeanPropertyMap(Collection<SettableBeanProperty> properties)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `BeanPropertyMap` | `assignIndexes()`
    `SettableBeanProperty` | `find(int propertyIndex)`
    `SettableBeanProperty` | `find(String key)`
    `SettableBeanProperty[]` | `getPropertiesInInsertionOrder()` Method that will re-create initial insertion-ordering of properties contained in this map.
    `Iterator<SettableBeanProperty>` | `iterator()` Accessor for traversing over all contained properties.
    `void` | `remove(SettableBeanProperty property)` Specialized method for removing specified existing entry.
    `BeanPropertyMap` | `renameAll(NameTransformer transformer)` Factory method for constructing a map where all entries use given prefix
    `void` | `replace(SettableBeanProperty property)` Specialized method that can be used to replace an existing entry (note: entry MUST exist; otherwise exception is thrown) with specified replacement.
    `int` | `size()`
    `String` | `toString()`
    `BeanPropertyMap` | `withProperty(SettableBeanProperty newProperty)` Fluent copy method that creates a new instance that is a copy of this instance except for one additional property that is passed as the argument.

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

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

- - ### Constructor Detail

    - #### BeanPropertyMap

          public BeanPropertyMap(Collection<SettableBeanProperty> properties)

  - ### Method Detail

    - #### withProperty

          public BeanPropertyMap withProperty(SettableBeanProperty newProperty)

      Fluent copy method that creates a new instance that is a copy of this instance except for one additional property that is passed as the argument. Note that method does not modify this instance but constructs and returns a new one.
      Since:
        2.0

    - #### renameAll

          public BeanPropertyMap renameAll(NameTransformer transformer)

      Factory method for constructing a map where all entries use given prefix

    - #### assignIndexes

          public BeanPropertyMap assignIndexes()

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### iterator

          public Iterator<SettableBeanProperty> iterator()

      Accessor for traversing over all contained properties.
      Specified by:
        `iterator` in interface `Iterable<SettableBeanProperty>`

    - #### getPropertiesInInsertionOrder

          public SettableBeanProperty[] getPropertiesInInsertionOrder()

      Method that will re-create initial insertion-ordering of properties contained in this map. Note that if properties have been removed, array may contain nulls; otherwise it should be consecutive.
      Since:
        2.1

    - #### size

          public int size()

    - #### find

          public SettableBeanProperty find(String key)

    - #### find

          public SettableBeanProperty find(int propertyIndex)

      Since:
        2.3

    - #### replace

          public void replace(SettableBeanProperty property)

      Specialized method that can be used to replace an existing entry (note: entry MUST exist; otherwise exception is thrown) with specified replacement.

    - #### remove

          public void remove(SettableBeanProperty property)

      Specialized method for removing specified existing entry. NOTE: entry MUST exist, otherwise an exception is thrown.

Copyright © 2014 FasterXML. All Rights Reserved.