public class AutowiredDependencyFactoryBean extends Object implements org.springframework.beans.factory.FactoryBean, org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.InitializingBean
| Constructor and Description |
|---|
AutowiredDependencyFactoryBean(Class<?>... beanTypes)
Creates a factory bean that automatically resolved to a bean of one of the given
beanTypes. |
AutowiredDependencyFactoryBean(Object defaultBean,
Class<?>... beanTypes)
Creates a factory bean that automatically resolved to a bean of one of the given
beanTypes,
reverting to the given defaultBean if no candidates are found. |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
Object |
getObject() |
Class<?> |
getObjectType() |
boolean |
isSingleton() |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
public AutowiredDependencyFactoryBean(Class<?>... beanTypes)
beanTypes.beanTypes - The types of bean to return a reference forpublic AutowiredDependencyFactoryBean(Object defaultBean, Class<?>... beanTypes)
beanTypes,
reverting to the given defaultBean if no candidates are found.defaultBean - The bean to return when no autowire candidates are foundbeanTypes - The types of bean to return a reference forpublic void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionpublic Object getObject() throws Exception
getObject in interface org.springframework.beans.factory.FactoryBeanExceptionpublic Class<?> getObjectType()
getObjectType in interface org.springframework.beans.factory.FactoryBeanpublic boolean isSingleton()
isSingleton in interface org.springframework.beans.factory.FactoryBeanCopyright © 2010-2014. All Rights Reserved.