接口 AliasRegistry
- 所有已知子接口:
BeanDefinitionRegistry
- 所有已知实现类:
AbstractAutowireCapableBeanFactory
,AbstractBeanFactory
,AnnotationConfigApplicationContext
,DefaultListableBeanFactory
,DefaultSingletonBeanRegistry
,FactoryBeanRegistrySupport
,GenericApplicationContext
,GenericGroovyApplicationContext
,GenericWebApplicationContext
,GenericXmlApplicationContext
,ResourceAdapterApplicationContext
,SimpleAliasRegistry
,SimpleBeanDefinitionRegistry
,StaticApplicationContext
,StaticWebApplicationContext
,XmlBeanFactory
public interface AliasRegistry
Common interface for managing aliases. Serves as a super-interface forBeanDefinitionRegistry
.- 从以下版本开始:
- 2.5.2
- 作者:
- Juergen Hoeller
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 String[]
getAliases(String name)
Return the aliases for the given name, if defined.boolean
isAlias(String name)
Determine whether the given name is defined 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.
方法详细资料
registerAlias
void registerAlias(String name, String alias)
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
void removeAlias(String alias)
Remove the specified alias from this registry.- 参数:
alias
- the alias to remove- 抛出:
IllegalStateException
- if no such alias was found
isAlias
boolean isAlias(String name)
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
String[] getAliases(String name)
Return the aliases for the given name, if defined.- 参数:
name
- the name to check for aliases- 返回:
- the aliases, or an empty array if none