org.springframework.core

## 类 SimpleAliasRegistry

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

- 所有已实现的接口:
    AliasRegistry

      public class SimpleAliasRegistry
      extends Object
      implements AliasRegistry

  Simple implementation of the `AliasRegistry` interface. Serves as base class for `org.springframework.beans.factory.support.BeanDefinitionRegistry` implementations.
  从以下版本开始:
    2.5.2
  作者:
    Juergen Hoeller

- - ### 字段概要

    字段
    限定符和类型 | 字段和说明
    --- | ---
    `protected Log` | `logger` Logger available to subclasses

  - ### 构造器概要

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

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `protected boolean` | `allowAliasOverriding()` Return whether alias overriding is allowed.
    `String` | `canonicalName(String name)` 解析bean 的别名
    `protected void` | `checkForAliasCircle(String name, String alias)` Check whether the given name points back to the given alias as an alias in the other direction already, catching a circular reference upfront and throwing a corresponding IllegalStateException.
    `String[]` | `getAliases(String name)` Return the aliases for the given name, if defined.
    `boolean` | `hasAlias(String name, String alias)` Determine whether the given name has the given alias registered.
    `boolean` | `isAlias(String name)` Determine whether this given name is defines as an alias (as opposed to the name of an actually registered component).
    `void` | `registerAlias(String name, String alias)` Given a name, register an alias for it.
    `void` | `removeAlias(String alias)` Remove the specified alias from this registry.
    `void` | `resolveAliases(StringValueResolver valueResolver)` Resolve all alias target names and aliases registered in this factory, applying the given StringValueResolver to them.

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

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

- - ### 字段详细资料

    - #### logger

          protected final Log logger

      Logger available to subclasses

  - ### 构造器详细资料

    - #### SimpleAliasRegistry

          public SimpleAliasRegistry()

  - ### 方法详细资料

    - #### registerAlias

          public void registerAlias(String name,
                                    String alias)

      从接口复制的说明: `AliasRegistry`
      Given a name, register an alias for it.
      指定者:
        `registerAlias` 在接口中 `AliasRegistry`
      参数:
        `name` - the canonical name
        `alias` - the alias to be registered

    - #### allowAliasOverriding

          protected boolean allowAliasOverriding()

      Return whether alias overriding is allowed. Default is `true`.

    - #### hasAlias

          public boolean hasAlias(String name,
                                  String alias)

      Determine whether the given name has the given alias registered.
      参数:
        `name` - the name to check
        `alias` - the alias to look for
      从以下版本开始:
        4.2.1

    - #### removeAlias

          public void removeAlias(String alias)

      从接口复制的说明: `AliasRegistry`
      Remove the specified alias from this registry.
      指定者:
        `removeAlias` 在接口中 `AliasRegistry`
      参数:
        `alias` - the alias to remove

    - #### isAlias

          public boolean isAlias(String name)

      从接口复制的说明: `AliasRegistry`
      Determine whether this given name is defines as an alias (as opposed to the name of an actually registered component).
      指定者:
        `isAlias` 在接口中 `AliasRegistry`
      参数:
        `name` - the name to check
      返回:
        whether the given name is an alias

    - #### getAliases

          public String[] getAliases(String name)

      从接口复制的说明: `AliasRegistry`
      Return the aliases for the given name, if defined.
      指定者:
        `getAliases` 在接口中 `AliasRegistry`
      参数:
        `name` - the name to check for aliases
      返回:
        the aliases, or an empty array if none

    - #### resolveAliases

          public void resolveAliases(StringValueResolver valueResolver)

      Resolve all alias target names and aliases registered in this factory, applying the given StringValueResolver to them.

      The value resolver may for example resolve placeholders in target bean names and even in alias names.

      参数:
        `valueResolver` - the StringValueResolver to apply

    - #### checkForAliasCircle

          protected void checkForAliasCircle(String name,
                                             String alias)

      Check whether the given name points back to the given alias as an alias in the other direction already, catching a circular reference upfront and throwing a corresponding IllegalStateException.
      参数:
        `name` - the candidate name
        `alias` - the candidate alias
      另请参阅:
        `registerAlias(java.lang.String, java.lang.String)`, `hasAlias(java.lang.String, java.lang.String)`

    - #### canonicalName

          public String canonicalName(String name)

      解析bean 的别名
      参数:
        `name` - bean传入的名称
      返回:
        返回的名称