org.kuali.rice.test
Class CompositeBeanFactory

java.lang.Object
  extended by org.kuali.rice.test.CompositeBeanFactory
All Implemented Interfaces:
org.springframework.beans.factory.BeanFactory

public final class CompositeBeanFactory
extends Object
implements org.springframework.beans.factory.BeanFactory

Wraps a collection of bean factories delegating to the inner bean factories. The first bean factory that returns a non-null/true result is the value that is returned/


Field Summary
 
Fields inherited from interface org.springframework.beans.factory.BeanFactory
FACTORY_BEAN_PREFIX
 
Constructor Summary
CompositeBeanFactory(Collection<? extends org.springframework.beans.factory.BeanFactory> factories)
           
 
Method Summary
 boolean containsBean(String name)
           
static org.springframework.beans.factory.BeanFactory createBeanFactory(Collection<? extends SpringResourceLoader> rls)
           
 String[] getAliases(String name)
           
<T> T
getBean(Class<T> requiredType)
           
 Object getBean(String name)
           
<T> T
getBean(String name, Class<T> requiredType)
           
 Object getBean(String name, Object... args)
           
 Class<?> getType(String name)
           
 boolean isPrototype(String name)
           
 boolean isSingleton(String name)
           
 boolean isTypeMatch(String name, Class targetType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositeBeanFactory

public CompositeBeanFactory(Collection<? extends org.springframework.beans.factory.BeanFactory> factories)
Method Detail

createBeanFactory

public static org.springframework.beans.factory.BeanFactory createBeanFactory(Collection<? extends SpringResourceLoader> rls)

getBean

public Object getBean(String name)
               throws org.springframework.beans.BeansException
Specified by:
getBean in interface org.springframework.beans.factory.BeanFactory
Throws:
org.springframework.beans.BeansException

getBean

public <T> T getBean(String name,
                     Class<T> requiredType)
          throws org.springframework.beans.BeansException
Specified by:
getBean in interface org.springframework.beans.factory.BeanFactory
Throws:
org.springframework.beans.BeansException

getBean

public <T> T getBean(Class<T> requiredType)
          throws org.springframework.beans.BeansException
Specified by:
getBean in interface org.springframework.beans.factory.BeanFactory
Throws:
org.springframework.beans.BeansException

getBean

public Object getBean(String name,
                      Object... args)
               throws org.springframework.beans.BeansException
Specified by:
getBean in interface org.springframework.beans.factory.BeanFactory
Throws:
org.springframework.beans.BeansException

containsBean

public boolean containsBean(String name)
Specified by:
containsBean in interface org.springframework.beans.factory.BeanFactory

isSingleton

public boolean isSingleton(String name)
                    throws org.springframework.beans.factory.NoSuchBeanDefinitionException
Specified by:
isSingleton in interface org.springframework.beans.factory.BeanFactory
Throws:
org.springframework.beans.factory.NoSuchBeanDefinitionException

isPrototype

public boolean isPrototype(String name)
                    throws org.springframework.beans.factory.NoSuchBeanDefinitionException
Specified by:
isPrototype in interface org.springframework.beans.factory.BeanFactory
Throws:
org.springframework.beans.factory.NoSuchBeanDefinitionException

isTypeMatch

public boolean isTypeMatch(String name,
                           Class targetType)
                    throws org.springframework.beans.factory.NoSuchBeanDefinitionException
Specified by:
isTypeMatch in interface org.springframework.beans.factory.BeanFactory
Throws:
org.springframework.beans.factory.NoSuchBeanDefinitionException

getType

public Class<?> getType(String name)
                 throws org.springframework.beans.factory.NoSuchBeanDefinitionException
Specified by:
getType in interface org.springframework.beans.factory.BeanFactory
Throws:
org.springframework.beans.factory.NoSuchBeanDefinitionException

getAliases

public String[] getAliases(String name)
Specified by:
getAliases in interface org.springframework.beans.factory.BeanFactory


Copyright © 2005-2011 The Kuali Foundation. All Rights Reserved.