BeanDefinitionRegistry interface.
Provides registry capabilities only, with no factory capabilities built in.
Can for example be used for testing bean definition readers.
| Modifier and Type | Field and Description |
|---|---|
| private final Map | beanDefinitionMap
Map of bean definition objects, keyed by bean name. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | containsBeanDefinition(String
the name of the bean to look for beanName)Implements org. |
| public BeanDefinition | getBeanDefinition(String
name of the bean to find a definition for beanName)Implements org. |
| public int | getBeanDefinitionCount()
Implements org. |
| public String[] | getBeanDefinitionNames()
Implements org. |
| public boolean | isBeanNameInUse(String
the name to check beanName)Implements org. |
| public void | registerBeanDefinition(String
the name of the bean instance to register beanName, BeanDefinition definition of the bean instance to register beanDefinition)Implements org. |
| public void | removeBeanDefinition(String
the name of the bean instance to register beanName)Implements org. |
| beanDefinitionMap | back to summary |
|---|---|
| private final Map<String, BeanDefinition> beanDefinitionMap Map of bean definition objects, keyed by bean name. | |
| SimpleBeanDefinitionRegistry | back to summary |
|---|---|
| public SimpleBeanDefinitionRegistry() | |
| containsBeanDefinition | back to summary |
|---|---|
| public boolean containsBeanDefinition(String beanName) Implements org. Doc from org. Check if this registry contains a bean definition with the given name. | |
| getBeanDefinition | back to summary |
|---|---|
| public BeanDefinition getBeanDefinition(String beanName) throws NoSuchBeanDefinitionException Implements org. Doc from org. Return the BeanDefinition for the given bean name.
| |
| getBeanDefinitionCount | back to summary |
|---|---|
| public int getBeanDefinitionCount() Implements org. Doc from org. Return the number of beans defined in the registry.
| |
| getBeanDefinitionNames | back to summary |
|---|---|
| public String[] getBeanDefinitionNames() Implements org. Doc from org. Return the names of all beans defined in this registry. | |
| isBeanNameInUse | back to summary |
|---|---|
| public boolean isBeanNameInUse(String beanName) Implements org. Doc from org. Determine whether the given bean name is already in use within this registry, i.e. whether there is a local bean or alias registered under this name. | |
| registerBeanDefinition | back to summary |
|---|---|
| public void registerBeanDefinition(String beanName, BeanDefinition beanDefinition) throws BeanDefinitionStoreException Implements org. Doc from org. Register a new bean definition with this registry. Must support RootBeanDefinition and ChildBeanDefinition.
| |
| removeBeanDefinition | back to summary |
|---|---|
| public void removeBeanDefinition(String beanName) throws NoSuchBeanDefinitionException Implements org. Doc from org. Remove the BeanDefinition for the given name.
| |