|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.core.SimpleAliasRegistry org.springframework.beans.factory.support.SimpleBeanDefinitionRegistry
public class SimpleBeanDefinitionRegistry
Simple implementation of the BeanDefinitionRegistry
interface.
Provides registry capabilities only, with no factory capabilities built in.
Can for example be used for testing bean definition readers.
Constructor Summary | |
---|---|
SimpleBeanDefinitionRegistry()
|
Method Summary | |
---|---|
boolean |
containsBeanDefinition(String beanName)
Check if this registry contains a bean definition with the given name. |
BeanDefinition |
getBeanDefinition(String beanName)
Return the BeanDefinition for the given bean name. |
int |
getBeanDefinitionCount()
Return the number of beans defined in the registry. |
String[] |
getBeanDefinitionNames()
Return the names of all beans defined in this registry. |
boolean |
isBeanNameInUse(String beanName)
Determine whether the given bean name is already in use within this registry, i.e. |
void |
registerBeanDefinition(String beanName,
BeanDefinition beanDefinition)
Register a new bean definition with this registry. |
void |
removeBeanDefinition(String beanName)
Remove the BeanDefinition for the given name. |
Methods inherited from class org.springframework.core.SimpleAliasRegistry |
---|
allowAliasOverriding, canonicalName, checkForAliasCircle, getAliases, isAlias, registerAlias, removeAlias, resolveAliases |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.springframework.core.AliasRegistry |
---|
getAliases, isAlias, registerAlias, removeAlias |
Constructor Detail |
---|
public SimpleBeanDefinitionRegistry()
Method Detail |
---|
public void registerBeanDefinition(String beanName, BeanDefinition beanDefinition) throws BeanDefinitionStoreException
BeanDefinitionRegistry
registerBeanDefinition
in interface BeanDefinitionRegistry
beanName
- the name of the bean instance to registerbeanDefinition
- definition of the bean instance to register
BeanDefinitionStoreException
- if the BeanDefinition is invalid
or if there is already a BeanDefinition for the specified bean name
(and we are not allowed to override it)RootBeanDefinition
,
ChildBeanDefinition
public void removeBeanDefinition(String beanName) throws NoSuchBeanDefinitionException
BeanDefinitionRegistry
removeBeanDefinition
in interface BeanDefinitionRegistry
beanName
- the name of the bean instance to register
NoSuchBeanDefinitionException
- if there is no such bean definitionpublic BeanDefinition getBeanDefinition(String beanName) throws NoSuchBeanDefinitionException
BeanDefinitionRegistry
getBeanDefinition
in interface BeanDefinitionRegistry
beanName
- name of the bean to find a definition for
null
)
NoSuchBeanDefinitionException
- if there is no such bean definitionpublic boolean containsBeanDefinition(String beanName)
BeanDefinitionRegistry
containsBeanDefinition
in interface BeanDefinitionRegistry
beanName
- the name of the bean to look for
public String[] getBeanDefinitionNames()
BeanDefinitionRegistry
getBeanDefinitionNames
in interface BeanDefinitionRegistry
public int getBeanDefinitionCount()
BeanDefinitionRegistry
getBeanDefinitionCount
in interface BeanDefinitionRegistry
public boolean isBeanNameInUse(String beanName)
BeanDefinitionRegistry
isBeanNameInUse
in interface BeanDefinitionRegistry
beanName
- the name to check
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |