Class Overview
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.
Summary
[Expand]
Inherited Methods |
From class
org.springframework.core.SimpleAliasRegistry
boolean
|
allowAliasOverriding()
Return whether alias overriding is allowed.
|
String
|
canonicalName(String name)
Determine the raw name, resolving aliases to canonical names.
|
void
|
checkForAliasCircle(String name, String alias)
Check whether the given name points back to given alias as an alias
in the other direction, catching a circular reference upfront and
throwing a corresponding IllegalStateException.
|
String[]
|
getAliases(String name)
Return the aliases for the given name, if defined.
|
boolean
|
isAlias(String name)
Determine whether this given name is defines 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.
|
void
|
resolveAliases(StringValueResolver valueResolver)
Resolve all alias target names and aliases registered in this
factory, applying the given StringValueResolver to them.
|
|
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
From interface
org.springframework.beans.factory.support.BeanDefinitionRegistry
|
From interface
org.springframework.core.AliasRegistry
abstract
String[]
|
getAliases(String name)
Return the aliases for the given name, if defined.
|
abstract
boolean
|
isAlias(String beanName)
Determine whether this given name is defines as an alias
(as opposed to the name of an actually registered component).
|
abstract
void
|
registerAlias(String name, String alias)
Given a name, register an alias for it.
|
abstract
void
|
removeAlias(String alias)
Remove the specified alias from this registry.
|
|
Public Constructors
public
SimpleBeanDefinitionRegistry
()
Public Methods
public
boolean
containsBeanDefinition
(String beanName)
Check if this registry contains a bean definition with the given name.
Parameters
beanName
| the name of the bean to look for |
Returns
- if this registry contains a bean definition with the given name
Return the BeanDefinition for the given bean name.
Parameters
beanName
| name of the bean to find a definition for |
Returns
- the BeanDefinition for the given name (never
null
)
public
int
getBeanDefinitionCount
()
Return the number of beans defined in the registry.
Returns
- the number of beans defined in the registry
public
String[]
getBeanDefinitionNames
()
Return the names of all beans defined in this registry.
Returns
- the names of all beans defined in this registry,
or an empty array if none defined
public
boolean
isBeanNameInUse
(String beanName)
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.
Parameters
beanName
| the name to check |
Returns
- whether the given bean name is already in use
public
void
registerBeanDefinition
(String beanName, BeanDefinition beanDefinition)
Register a new bean definition with this registry.
Must support RootBeanDefinition and ChildBeanDefinition.
Parameters
beanName
| the name of the bean instance to register |
beanDefinition
| definition of the bean instance to register |
public
void
removeBeanDefinition
(String beanName)
Remove the BeanDefinition for the given name.
Parameters
beanName
| the name of the bean instance to register |