org.springframework.beans.factory.config

## 类 ConstructorArgumentValues.ValueHolder

- java.lang.Object
- - org.springframework.beans.factory.config.ConstructorArgumentValues.ValueHolder

- 所有已实现的接口:
    BeanMetadataElement
  封闭类:
    ConstructorArgumentValues

      public static class ConstructorArgumentValues.ValueHolder
      extends Object
      implements BeanMetadataElement

  Holder for a constructor argument value, with an optional type attribute indicating the target type of the actual constructor argument.

- - ### 构造器概要

    构造器
    构造器和说明
    `ValueHolder(Object value)` Create a new ValueHolder for the given value.
    `ValueHolder(Object value, String type)` Create a new ValueHolder for the given value and type.
    `ValueHolder(Object value, String type, String name)` Create a new ValueHolder for the given value, type and name.

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `ConstructorArgumentValues.ValueHolder` | `copy()` Create a copy of this ValueHolder: that is, an independent ValueHolder instance with the same contents.
    `Object` | `getConvertedValue()` Return the converted value of the constructor argument, after processed type conversion.
    `String` | `getName()` Return the name of the constructor argument.
    `Object` | `getSource()` 获取源对象,可能返回null Return the configuration source `Object` for this metadata element (may be `null`).
    `String` | `getType()` Return the type of the constructor argument.
    `Object` | `getValue()` Return the value for the constructor argument.
    `boolean` | `isConverted()` Return whether this holder contains a converted value already (`true`), or whether the value still needs to be converted (`false`).
    `void` | `setConvertedValue(Object value)` Set the converted value of the constructor argument, after processed type conversion.
    `void` | `setName(String name)` Set the name of the constructor argument.
    `void` | `setSource(Object source)` Set the configuration source `Object` for this metadata element.
    `void` | `setType(String type)` Set the type of the constructor argument.
    `void` | `setValue(Object value)` Set the value for the constructor argument.

    - ### 从类继承的方法 java.lang.Object

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

- - ### 构造器详细资料

    - #### ValueHolder

          public ValueHolder(@Nullable
                             Object value)

      Create a new ValueHolder for the given value.
      参数:
        `value` - the argument value

    - #### ValueHolder

          public ValueHolder(@Nullable
                             Object value,
                             @Nullable
                             String type)

      Create a new ValueHolder for the given value and type.
      参数:
        `value` - the argument value
        `type` - the type of the constructor argument

    - #### ValueHolder

          public ValueHolder(@Nullable
                             Object value,
                             @Nullable
                             String type,
                             @Nullable
                             String name)

      Create a new ValueHolder for the given value, type and name.
      参数:
        `value` - the argument value
        `type` - the type of the constructor argument
        `name` - the name of the constructor argument

  - ### 方法详细资料

    - #### setValue

          public void setValue(@Nullable
                               Object value)

      Set the value for the constructor argument.
      另请参阅:
        `PropertyPlaceholderConfigurer`

    - #### getValue

          @Nullable
          public Object getValue()

      Return the value for the constructor argument.

    - #### setType

          public void setType(@Nullable
                              String type)

      Set the type of the constructor argument.

    - #### getType

          @Nullable
          public String getType()

      Return the type of the constructor argument.

    - #### setName

          public void setName(@Nullable
                              String name)

      Set the name of the constructor argument.

    - #### getName

          @Nullable
          public String getName()

      Return the name of the constructor argument.

    - #### setSource

          public void setSource(@Nullable
                                Object source)

      Set the configuration source `Object` for this metadata element.

      The exact type of the object will depend on the configuration mechanism used.

    - #### getSource

          @Nullable
          public Object getSource()

      从接口复制的说明: `BeanMetadataElement`
      获取源对象,可能返回null Return the configuration source `Object` for this metadata element (may be `null`).
      指定者:
        `getSource` 在接口中 `BeanMetadataElement`

    - #### isConverted

          public boolean isConverted()

      Return whether this holder contains a converted value already (`true`), or whether the value still needs to be converted (`false`).

    - #### setConvertedValue

          public void setConvertedValue(@Nullable
                                        Object value)

      Set the converted value of the constructor argument, after processed type conversion.

    - #### getConvertedValue

          @Nullable
          public Object getConvertedValue()

      Return the converted value of the constructor argument, after processed type conversion.

    - #### copy

          public ConstructorArgumentValues.ValueHolder copy()

      Create a copy of this ValueHolder: that is, an independent ValueHolder instance with the same contents.