org.springframework.beans

## 接口 BeanWrapper

- 所有超级接口:
    ConfigurablePropertyAccessor, PropertyAccessor, PropertyEditorRegistry, TypeConverter
  所有已知实现类:
    BeanWrapperImpl

      public interface BeanWrapper
      extends ConfigurablePropertyAccessor

  The central interface of Spring's low-level JavaBeans infrastructure.

  Typically not used directly but rather implicitly via a `BeanFactory` or a `org.springframework.validation.DataBinder`.

  Provides operations to analyze and manipulate standard JavaBeans: the ability to get and set property values (individually or in bulk), get property descriptors, and query the readability/writability of properties.

  This interface supports nested properties enabling the setting of properties on subproperties to an unlimited depth.

  A BeanWrapper's default for the "extractOldValueForEditor" setting is "false", to avoid side effects caused by getter method invocations. Turn this to "true" to expose present property values to custom editors.

  从以下版本开始:
    13 April 2001
  作者:
    Rod Johnson, Juergen Hoeller
  另请参阅:
    `PropertyAccessor`, `PropertyEditorRegistry`, `PropertyAccessorFactory.forBeanPropertyAccess(java.lang.Object)`, `BeanFactory`, `org.springframework.validation.BeanPropertyBindingResult`, `org.springframework.validation.DataBinder#initBeanPropertyAccess()`

- - ### 字段概要

    - ### 从接口继承的字段 org.springframework.beans.PropertyAccessor

      `NESTED_PROPERTY_SEPARATOR, NESTED_PROPERTY_SEPARATOR_CHAR, PROPERTY_KEY_PREFIX, PROPERTY_KEY_PREFIX_CHAR, PROPERTY_KEY_SUFFIX, PROPERTY_KEY_SUFFIX_CHAR`

  - ### 方法概要

    所有方法 实例方法 抽象方法
    限定符和类型 | 方法和说明
    --- | ---
    `int` | `getAutoGrowCollectionLimit()` Return the limit for array and collection auto-growing.
    `PropertyDescriptor` | `getPropertyDescriptor(String propertyName)` Obtain the property descriptor for a specific property of the wrapped object.
    `PropertyDescriptor[]` | `getPropertyDescriptors()` Obtain the PropertyDescriptors for the wrapped object (as determined by standard JavaBeans introspection).
    `Class<?>` | `getWrappedClass()` Return the type of the wrapped bean instance.
    `Object` | `getWrappedInstance()` Return the bean instance wrapped by this object.
    `void` | `setAutoGrowCollectionLimit(int autoGrowCollectionLimit)` Specify a limit for array and collection auto-growing.

    - ### 从接口继承的方法 org.springframework.beans.ConfigurablePropertyAccessor

      `getConversionService, isAutoGrowNestedPaths, isExtractOldValueForEditor, setAutoGrowNestedPaths, setConversionService, setExtractOldValueForEditor`

    - ### 从接口继承的方法 org.springframework.beans.PropertyAccessor

      `getPropertyType, getPropertyTypeDescriptor, getPropertyValue, isReadableProperty, isWritableProperty, setPropertyValue, setPropertyValue, setPropertyValues, setPropertyValues, setPropertyValues, setPropertyValues`

    - ### 从接口继承的方法 org.springframework.beans.PropertyEditorRegistry

      `findCustomEditor, registerCustomEditor, registerCustomEditor`

    - ### 从接口继承的方法 org.springframework.beans.TypeConverter

      `convertIfNecessary, convertIfNecessary, convertIfNecessary`

- - ### 方法详细资料

    - #### setAutoGrowCollectionLimit

          void setAutoGrowCollectionLimit(int autoGrowCollectionLimit)

      Specify a limit for array and collection auto-growing.

      Default is unlimited on a plain BeanWrapper.

      从以下版本开始:
        4.1

    - #### getAutoGrowCollectionLimit

          int getAutoGrowCollectionLimit()

      Return the limit for array and collection auto-growing.
      从以下版本开始:
        4.1

    - #### getWrappedInstance

          Object getWrappedInstance()

      Return the bean instance wrapped by this object.

    - #### getWrappedClass

          Class<?> getWrappedClass()

      Return the type of the wrapped bean instance.

    - #### getPropertyDescriptors

          PropertyDescriptor[] getPropertyDescriptors()

      Obtain the PropertyDescriptors for the wrapped object (as determined by standard JavaBeans introspection).
      返回:
        the PropertyDescriptors for the wrapped object

    - #### getPropertyDescriptor

          PropertyDescriptor getPropertyDescriptor(String propertyName)
                                            throws InvalidPropertyException

      Obtain the property descriptor for a specific property of the wrapped object.
      参数:
        `propertyName` - the property to obtain the descriptor for (may be a nested path, but no indexed/mapped property)
      返回:
        the property descriptor for the specified property
      抛出:
        `InvalidPropertyException` - if there is no such property