站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Spring Framework 2.0.5 API 文档英文版

HierarchicalBeanFactory (Spring Framework API 2.0) - Spring Framework 2.0.5 API 文档英文版

The Spring Framework

org.springframework.beans.factory
Interface HierarchicalBeanFactory

All Superinterfaces:
BeanFactory
All Known Subinterfaces:
ApplicationContext, ConfigurableApplicationContext, ConfigurableBeanFactory, ConfigurableListableBeanFactory, ConfigurablePortletApplicationContext, ConfigurableWebApplicationContext, WebApplicationContext
All Known Implementing Classes:
AbstractApplicationContext, AbstractAutowireCapableBeanFactory, AbstractBeanFactory, AbstractRefreshableApplicationContext, AbstractRefreshablePortletApplicationContext, AbstractRefreshableWebApplicationContext, AbstractXmlApplicationContext, ClassPathXmlApplicationContext, DefaultListableBeanFactory, FileSystemXmlApplicationContext, GenericApplicationContext, GenericWebApplicationContext, StaticApplicationContext, StaticPortletApplicationContext, StaticWebApplicationContext, XmlBeanFactory, XmlPortletApplicationContext, XmlWebApplicationContext

public interface HierarchicalBeanFactory
extends BeanFactory

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.

Since:
07.07.2003
Author:
Rod Johnson, Juergen Hoeller
See Also:
ConfigurableBeanFactory.setParentBeanFactory(org.springframework.beans.factory.BeanFactory)

Field Summary
 
Fields inherited from interface org.springframework.beans.factory.BeanFactory
FACTORY_BEAN_PREFIX
 
Method Summary
 boolean containsLocalBean(String name)
          Return whether the local bean factory contains a bean of the given name, ignoring beans defined in ancestor contexts.
 BeanFactory getParentBeanFactory()
          Return the parent bean factory, or null if there is none.
 
Methods inherited from interface org.springframework.beans.factory.BeanFactory
containsBean, getAliases, getBean, getBean, getType, isPrototype, isSingleton, isTypeMatch
 

Method Detail

getParentBeanFactory

BeanFactory getParentBeanFactory()
Return the parent bean factory, or null if there is none.


containsLocalBean

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 - the name of the bean to query
Returns:
whether a bean with the given name is defined in the local factory
See Also:
BeanFactory.containsBean(java.lang.String)

The Spring Framework

Copyright © 2002-2007 The Spring Framework.