Save This Page
Home » spring-framework-2.5.5-with-dependencies » org.springframework » beans » factory » support » [javadoc | source]
org.springframework.beans.factory.support
public class: StaticListableBeanFactory [javadoc | source]
java.lang.Object
   org.springframework.beans.factory.support.StaticListableBeanFactory

All Implemented Interfaces:
    ListableBeanFactory

Static org.springframework.beans.factory.BeanFactory implementation which allows to register existing singleton instances programmatically. Does not have support for prototype beans or aliases.

Serves as example for a simple implementation of the org.springframework.beans.factory.ListableBeanFactory interface, managing existing bean instances rather than creating new ones based on bean definitions, and not implementing any extended SPI interfaces (such as org.springframework.beans.factory.config.ConfigurableBeanFactory ).

For a full-fledged factory based on bean definitions, have a look at DefaultListableBeanFactory .

Method from org.springframework.beans.factory.support.StaticListableBeanFactory Summary:
addBean,   containsBean,   containsBeanDefinition,   getAliases,   getBean,   getBean,   getBean,   getBeanDefinitionCount,   getBeanDefinitionNames,   getBeanNamesForType,   getBeanNamesForType,   getBeansOfType,   getBeansOfType,   getType,   isPrototype,   isSingleton,   isTypeMatch
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.springframework.beans.factory.support.StaticListableBeanFactory Detail:
 public  void addBean(String name,
    Object bean) 
    Add a new singleton bean. Will overwrite any existing instance for the given name.
 public boolean containsBean(String name) 
 public boolean containsBeanDefinition(String name) 
 public String[] getAliases(String name) 
 public Object getBean(String name) throws BeansException 
 public Object getBean(String name,
    Class requiredType) throws BeansException 
 public Object getBean(String name,
    Object[] args) throws BeansException 
 public int getBeanDefinitionCount() 
 public String[] getBeanDefinitionNames() 
 public String[] getBeanNamesForType(Class type) 
 public String[] getBeanNamesForType(Class type,
    boolean includeNonSingletons,
    boolean includeFactoryBeans) 
 public Map getBeansOfType(Class type) throws BeansException 
 public Map getBeansOfType(Class type,
    boolean includeNonSingletons,
    boolean includeFactoryBeans) throws BeansException 
 public Class getType(String name) throws NoSuchBeanDefinitionException 
 public boolean isPrototype(String name) throws NoSuchBeanDefinitionException 
 public boolean isSingleton(String name) throws NoSuchBeanDefinitionException 
 public boolean isTypeMatch(String name,
    Class targetType) throws NoSuchBeanDefinitionException