Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.core
Interface AliasRegistry

All Known Subinterfaces:
  BeanDefinitionRegistry

All Known Implementing Classes:
  AbstractAutowireCapableBeanFactory, AbstractBeanFactory, AnnotationConfigApplicationContext, DefaultListableBeanFactory, DefaultSingletonBeanRegistry, FactoryBeanRegistrySupport, GenericApplicationContext, GenericWebApplicationContext, GenericXmlApplicationContext, ResourceAdapterApplicationContext, SimpleAliasRegistry, SimpleBeanDefinitionRegistry, StaticApplicationContext, StaticPortletApplicationContext, StaticWebApplicationContext, XmlBeanFactory

    public interface AliasRegistry

Common interface for managing aliases. Serves as super-interface for `BeanDefinitionRegistry`.

Since:
  2.5.2
Author:
  Juergen Hoeller

Method Summary
`java.lang.String[]` | `getAliases(java.lang.String name)` Return the aliases for the given name, if defined.
`boolean` | `isAlias(java.lang.String beanName)` Determine whether this given name is defines as an alias (as opposed to the name of an actually registered component).
`void` | `registerAlias(java.lang.String name, java.lang.String alias)` Given a name, register an alias for it.
`void` | `removeAlias(java.lang.String alias)` Remove the specified alias from this registry.

Method Detail

### registerAlias

    void registerAlias(java.lang.String name,
                       java.lang.String alias)

  Given a name, register an alias for it.

  Parameters:
    `name` - the canonical name
    `alias` - the alias to be registered
  Throws:
    `java.lang.IllegalStateException` - if the alias is already in use and may not be overridden

### removeAlias

    void removeAlias(java.lang.String alias)

  Remove the specified alias from this registry.

  Parameters:
    `alias` - the alias to remove
  Throws:
    `java.lang.IllegalStateException` - if no such alias was found

### isAlias

    boolean isAlias(java.lang.String beanName)

  Determine whether this given name is defines as an alias (as opposed to the name of an actually registered component).

  Parameters:
    `beanName` - the bean name to check
  Returns:
    whether the given name is an alias

### getAliases

    java.lang.String[] getAliases(java.lang.String name)

  Return the aliases for the given name, if defined.

  Parameters:
    `name` - the name to check for aliases
  Returns:
    the aliases, or an empty array if none

Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD