接口 AliasRegistry
- 所有已知实现类:
DefaultAliasRegistry,StandardTypeLocator
public interface AliasRegistry
Common interface for managing aliases. Serves as a super-interface for
cn.taketoday.beans.factory.support.BeanDefinitionRegistry.- 从以下版本开始:
- 4.0
- 作者:
- Juergen Hoeller, TODAY 2021/9/30 22:38
-
方法概要
修饰符和类型方法说明String[]getAliases(String name) Return the aliases for the given name, if defined.getAliasList(String name) Return the aliases list for the given name, if defined.booleanDetermine whether the given name is defined as an alias (as opposed to the name of an actually registered component).voidregisterAlias(String name, String alias) Given a name, register an alias for it.voidremoveAlias(String alias) Remove the specified alias from this registry.
-
方法详细资料
-
registerAlias
Given a name, register an alias for it.- 参数:
name- the canonical namealias- the alias to be registered- 抛出:
IllegalStateException- if the alias is already in use and may not be overridden
-
removeAlias
Remove the specified alias from this registry.- 参数:
alias- the alias to remove- 抛出:
IllegalStateException- if no such alias was found
-
isAlias
Determine whether the given name is defined as an alias (as opposed to the name of an actually registered component).- 参数:
name- the name to check- 返回:
- whether the given name is an alias
-
getAliases
Return the aliases for the given name, if defined.- 参数:
name- the name to check for aliases- 返回:
- the aliases, or an empty array if none
-
getAliasList
Return the aliases list for the given name, if defined.- 参数:
name- the name to check for aliases- 返回:
- the aliases, or an empty array-list if none
-