org.springframework.core

## 类 AttributeAccessorSupport

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

- 所有已实现的接口:
    Serializable, AttributeAccessor

      public abstract class AttributeAccessorSupport
      extends Object
      implements AttributeAccessor, Serializable

  Support class for `AttributeAccessors`, providing a base implementation of all methods. To be extended by subclasses.

  `Serializable` if subclasses and all attribute values are `Serializable`.

  从以下版本开始:
    2.0
  作者:
    Rob Harrop, Juergen Hoeller
  另请参阅:
    序列化表格

- - ### 构造器概要

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

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `String[]` | `attributeNames()` Return the names of all attributes.
    `protected void` | `copyAttributesFrom(AttributeAccessor source)` Copy the attributes from the supplied AttributeAccessor to this accessor.
    `boolean` | `equals(Object other)`
    `Object` | `getAttribute(String name)` Get the value of the attribute identified by `name`.
    `boolean` | `hasAttribute(String name)` Return `true` if the attribute identified by `name` exists.
    `int` | `hashCode()`
    `Object` | `removeAttribute(String name)` Remove the attribute identified by `name` and return its value.
    `void` | `setAttribute(String name, Object value)` Set the attribute defined by `name` to the supplied `value`.

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

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

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

    - #### AttributeAccessorSupport

          public AttributeAccessorSupport()

  - ### 方法详细资料

    - #### setAttribute

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

      从接口复制的说明: `AttributeAccessor`
      Set the attribute defined by `name` to the supplied `value`. If `value` is `null`, the attribute is `removed`.

      In general, users should take care to prevent overlaps with other metadata attributes by using fully-qualified names, perhaps using class or package names as prefix.

      指定者:
        `setAttribute` 在接口中 `AttributeAccessor`
      参数:
        `name` - the unique attribute key
        `value` - the attribute value to be attached

    - #### getAttribute

          @Nullable
          public Object getAttribute(String name)

      从接口复制的说明: `AttributeAccessor`
      Get the value of the attribute identified by `name`. Return `null` if the attribute doesn't exist.
      指定者:
        `getAttribute` 在接口中 `AttributeAccessor`
      参数:
        `name` - the unique attribute key
      返回:
        the current value of the attribute, if any

    - #### removeAttribute

          @Nullable
          public Object removeAttribute(String name)

      从接口复制的说明: `AttributeAccessor`
      Remove the attribute identified by `name` and return its value. Return `null` if no attribute under `name` is found.
      指定者:
        `removeAttribute` 在接口中 `AttributeAccessor`
      参数:
        `name` - the unique attribute key
      返回:
        the last value of the attribute, if any

    - #### hasAttribute

          public boolean hasAttribute(String name)

      从接口复制的说明: `AttributeAccessor`
      Return `true` if the attribute identified by `name` exists. Otherwise return `false`.
      指定者:
        `hasAttribute` 在接口中 `AttributeAccessor`
      参数:
        `name` - the unique attribute key

    - #### attributeNames

          public String[] attributeNames()

      从接口复制的说明: `AttributeAccessor`
      Return the names of all attributes.
      指定者:
        `attributeNames` 在接口中 `AttributeAccessor`

    - #### copyAttributesFrom

          protected void copyAttributesFrom(AttributeAccessor source)

      Copy the attributes from the supplied AttributeAccessor to this accessor.
      参数:
        `source` - the AttributeAccessor to copy from

    - #### equals

          public boolean equals(Object other)

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

    - #### hashCode

          public int hashCode()

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