org.springframework.beans.factory.support
Class StaticListableBeanFactory


public class StaticListableBeanFactory
implements ListableBeanFactory

Static factory that allows to register existing singleton instances programmatically.

Author:
Rod Johnson
Version: $Id: StaticListableBeanFactory.java,v 1.8 2004/01/20 11:26:43 jhoeller Exp $
Since: 06-Jan-03

Method Summary
 voidaddBean(String name, Object bean)
          Add a new singleton bean.
 booleancontainsBean(String name)
           
 booleancontainsBeanDefinition(String name)
           
 String[]getAliases(String name)
           
 ObjectgetBean(String name)
           
 ObjectgetBean(String name, Class requiredType)
           
 intgetBeanDefinitionCount()
           
 String[]getBeanDefinitionNames()
           
 String[]getBeanDefinitionNames(Class type)
           
 MapgetBeansOfType(Class type, boolean includePrototypes, boolean includeFactoryBeans)
           
 booleanisSingleton(String name)
           

Method Detail

addBean

public void addBean(String name, Object bean)
Add a new singleton bean.

containsBean

public boolean containsBean(String name)

containsBeanDefinition

public boolean containsBeanDefinition(String name)

getAliases

public String[] getAliases(String name)

getBean

public Object getBean(String name)
throws org.springframework.beans.BeansException

getBean

public Object getBean(String name, Class requiredType)
throws org.springframework.beans.BeansException

getBeanDefinitionCount

public int getBeanDefinitionCount()

getBeanDefinitionNames

public String[] getBeanDefinitionNames()

getBeanDefinitionNames

public String[] getBeanDefinitionNames(Class type)

getBeansOfType

public Map getBeansOfType(Class type, boolean includePrototypes, boolean includeFactoryBeans)

isSingleton

public boolean isSingleton(String name)
throws org.springframework.beans.factory.NoSuchBeanDefinitionException

Association Links

to Class java.util.Map

Map from bean name to bean instance