org.springframework.beans

## 类 BeanMetadataAttributeAccessor

- java.lang.Object
- - org.springframework.core.AttributeAccessorSupport
  - - org.springframework.beans.BeanMetadataAttributeAccessor

- 所有已实现的接口:
    Serializable, BeanMetadataElement, org.springframework.core.AttributeAccessor
  直接已知子类:
    AbstractBeanDefinition, AutowireCandidateQualifier, PropertyValue

      public class BeanMetadataAttributeAccessor
      extends org.springframework.core.AttributeAccessorSupport
      implements BeanMetadataElement

  Extension of `AttributeAccessorSupport`, holding attributes as `BeanMetadataAttribute` objects in order to keep track of the definition source.
  从以下版本开始:
    2.5
  作者:
    Juergen Hoeller
  另请参阅:
    序列化表格

- - ### 构造器概要

    构造器
    构造器和说明
    `BeanMetadataAttributeAccessor()`

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `void` | `addMetadataAttribute(BeanMetadataAttribute attribute)` Add the given BeanMetadataAttribute to this accessor's set of attributes.
    `Object` | `getAttribute(String name)`
    `BeanMetadataAttribute` | `getMetadataAttribute(String name)` Look up the given BeanMetadataAttribute in this accessor's set of attributes.
    `Object` | `getSource()` 获取源对象,可能返回null Return the configuration source `Object` for this metadata element (may be `null`).
    `Object` | `removeAttribute(String name)`
    `void` | `setAttribute(String name, Object value)`
    `void` | `setSource(Object source)` Set the configuration source `Object` for this metadata element.

    - ### 从类继承的方法 org.springframework.core.AttributeAccessorSupport

      `attributeNames, copyAttributesFrom, equals, hasAttribute, hashCode`

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

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

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

    - #### BeanMetadataAttributeAccessor

          public BeanMetadataAttributeAccessor()

  - ### 方法详细资料

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

    - #### addMetadataAttribute

          public void addMetadataAttribute(BeanMetadataAttribute attribute)

      Add the given BeanMetadataAttribute to this accessor's set of attributes.
      参数:
        `attribute` - the BeanMetadataAttribute object to register

    - #### getMetadataAttribute

          @Nullable
          public BeanMetadataAttribute getMetadataAttribute(String name)

      Look up the given BeanMetadataAttribute in this accessor's set of attributes.
      参数:
        `name` - the name of the attribute
      返回:
        the corresponding BeanMetadataAttribute object, or `null` if no such attribute defined

    - #### setAttribute

          public void setAttribute(String name,
                                   @Nullable
                                   Object value)

      指定者:
        `setAttribute` 在接口中 `org.springframework.core.AttributeAccessor`
      覆盖:
        `setAttribute` 在类中 `org.springframework.core.AttributeAccessorSupport`

    - #### getAttribute

          @Nullable
          public Object getAttribute(String name)

      指定者:
        `getAttribute` 在接口中 `org.springframework.core.AttributeAccessor`
      覆盖:
        `getAttribute` 在类中 `org.springframework.core.AttributeAccessorSupport`

    - #### removeAttribute

          @Nullable
          public Object removeAttribute(String name)

      指定者:
        `removeAttribute` 在接口中 `org.springframework.core.AttributeAccessor`
      覆盖:
        `removeAttribute` 在类中 `org.springframework.core.AttributeAccessorSupport`