Top Description Fields Methods
org.springframework.beans.factory

public Interface HierarchicalBeanFactory

extends BeanFactory
Known Direct Subinterfaces
org.springframework.beans.factory.config.ConfigurableBeanFactory
Imports
org.springframework.lang.Nullable

Sub-interface implemented by bean factories that can be part of a hierarchy.

The corresponding setParentBeanFactory method for bean factories that allow setting the parent in a configurable fashion can be found in the ConfigurableBeanFactory interface.

Authors
Rod Johnson, Juergen Hoeller
Since
07.07.2003
See Also
org.springframework.beans.factory.config.ConfigurableBeanFactory#setParentBeanFactory

Field Summary

Inherited from org.springframework.beans.factory.BeanFactory:
FACTORY_BEAN_PREFIX

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

whether a bean with the given name is defined in the local factory
containsLocalBean
(String
the name of the bean to query
name
)

Return whether the local bean factory contains a bean of the given name, ignoring beans defined in ancestor contexts.

public BeanFactory
getParentBeanFactory()

Return the parent bean factory, or null if there is none.

Inherited from org.springframework.beans.factory.BeanFactory:
containsBeangetAliasesgetBeangetBeangetBeangetBeangetBeangetBeanProvidergetBeanProvidergetTypegetTypeisPrototypeisSingletonisTypeMatchisTypeMatch

Method Detail

containsLocalBeanback to summary
public boolean containsLocalBean(String name)

Return whether the local bean factory contains a bean of the given name, ignoring beans defined in ancestor contexts.

This is an alternative to containsBean, ignoring a bean of the given name from an ancestor bean factory.

Parameters
name:String

the name of the bean to query

Returns:boolean

whether a bean with the given name is defined in the local factory

See Also
BeanFactory#containsBean
getParentBeanFactoryback to summary
public BeanFactory getParentBeanFactory()

Return the parent bean factory, or null if there is none.

Annotations
@Nullable