当前页面:
在线文档首页 >
Spring Framework 2.0.5 API 文档英文版
BeanFactoryAware (Spring Framework API 2.0) - Spring Framework 2.0.5 API 文档英文版
org.springframework.beans.factory
Interface BeanFactoryAware
- All Known Implementing Classes:
- AbstractAdvisorAutoProxyCreator, AbstractAutoProxyCreator, AbstractBeanFactoryBasedTargetSource, AbstractBeanFactoryBasedTargetSourceCreator, AbstractBeanFactoryPointcutAdvisor, AbstractFactoryBean, AbstractPoolingTargetSource, AbstractPrototypeBasedTargetSource, AnnotationAwareAspectJAutoProxyCreator, AspectJAwareAdvisorAutoProxyCreator, BeanConfigurerSupport, BeanFactoryDataSourceLookup, BeanNameAutoProxyCreator, BeanReferenceFactoryBean, CommonsPoolTargetSource, DefaultAdvisorAutoProxyCreator, DefaultBeanFactoryPointcutAdvisor, HibernateAccessor, HibernateAccessor, HibernateInterceptor, HibernateInterceptor, HibernateTemplate, HibernateTemplate, HibernateTransactionManager, HibernateTransactionManager, LazyInitTargetSource, LazyInitTargetSourceCreator, ListFactoryBean, MapFactoryBean, MBeanExporter, MethodInvokingFactoryBean, MethodInvokingJobDetailFactoryBean, MethodLocatingFactoryBean, ObjectFactoryCreatingFactoryBean, OpenSessionInViewInterceptor, OpenSessionInViewInterceptor, PersistenceAnnotationBeanPostProcessor, PersistenceExceptionTranslationInterceptor, PersistenceExceptionTranslationPostProcessor, PreferencesPlaceholderConfigurer, PropertyPathFactoryBean, PropertyPlaceholderConfigurer, PrototypeTargetSource, ProxyFactoryBean, QuickTargetSourceCreator, ScopedProxyFactoryBean, ScriptFactoryPostProcessor, ServiceLocatorFactoryBean, ServletContextPropertyPlaceholderConfigurer, SetFactoryBean, SimpleBeanFactoryAwareAspectInstanceFactory, SimpleBeanTargetSource, ThreadLocalTargetSource, TransactionProxyFactoryBean
public interface BeanFactoryAware
Interface to be implemented by beans that wish to be aware of their
owning BeanFactory
.
For example, beans can look up collaborating beans via the factory
(Dependency Lookup). Note that most beans will choose to receive references
to collaborating beans via corresponding bean properties or constructor
arguments (Dependency Injection).
For a list of all bean lifecycle methods, see the
BeanFactory javadocs
.
- Since:
- 11.03.2003
- Author:
- Rod Johnson
- See Also:
BeanNameAware
,
BeanClassLoaderAware
,
InitializingBean
,
ApplicationContextAware
setBeanFactory
void setBeanFactory(BeanFactory beanFactory)
throws BeansException
- Callback that supplies the owning factory to a bean instance.
Invoked after the population of normal bean properties
but before an initialization callback such as
InitializingBean.afterPropertiesSet()
or a custom init-method.
- Parameters:
beanFactory
- owning BeanFactory (never null
).
The bean can immediately call methods on the factory.
- Throws:
BeansException
- in case of initialization errors- See Also:
BeanInitializationException
Copyright © 2002-2007 The Spring Framework.