org.springframework.beans.factory.config

## 类 RuntimeBeanReference

- java.lang.Object
- - org.springframework.beans.factory.config.RuntimeBeanReference

- 所有已实现的接口:
    BeanMetadataElement, BeanReference

      public class RuntimeBeanReference
      extends Object
      implements BeanReference

  Immutable placeholder class used for a property value object when it's a reference to another bean in the factory, to be resolved at runtime.
  作者:
    Rod Johnson, Juergen Hoeller
  另请参阅:
    `BeanDefinition.getPropertyValues()`, `BeanFactory.getBean(String)`

- - ### 构造器概要

    构造器
    构造器和说明
    `RuntimeBeanReference(String beanName)` Create a new RuntimeBeanReference to the given bean name.
    `RuntimeBeanReference(String beanName, boolean toParent)` Create a new RuntimeBeanReference to the given bean name, with the option to mark it as reference to a bean in the parent factory.

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `boolean` | `equals(Object other)`
    `String` | `getBeanName()` Return the target bean name that this reference points to (never `null`).
    `Object` | `getSource()` 获取源对象,可能返回null Return the configuration source `Object` for this metadata element (may be `null`).
    `int` | `hashCode()`
    `boolean` | `isToParent()` Return whether this is an explicit reference to a bean in the parent factory.
    `void` | `setSource(Object source)` Set the configuration source `Object` for this metadata element.
    `String` | `toString()`

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

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

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

    - #### RuntimeBeanReference

          public RuntimeBeanReference(String beanName)

      Create a new RuntimeBeanReference to the given bean name.
      参数:
        `beanName` - name of the target bean

    - #### RuntimeBeanReference

          public RuntimeBeanReference(String beanName,
                                      boolean toParent)

      Create a new RuntimeBeanReference to the given bean name, with the option to mark it as reference to a bean in the parent factory.
      参数:
        `beanName` - name of the target bean
        `toParent` - whether this is an explicit reference to a bean in the parent factory

  - ### 方法详细资料

    - #### getBeanName

          public String getBeanName()

      从接口复制的说明: `BeanReference`
      Return the target bean name that this reference points to (never `null`).
      指定者:
        `getBeanName` 在接口中 `BeanReference`

    - #### isToParent

          public boolean isToParent()

      Return whether this is an explicit reference to a bean in the parent factory.

    - #### 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`

    - #### equals

          public boolean equals(Object other)

      覆盖:
        `equals` 在类中 `Object`

    - #### hashCode

          public int hashCode()

      覆盖:
        `hashCode` 在类中 `Object`

    - #### toString

          public String toString()

      覆盖:
        `toString` 在类中 `Object`