Save This Page
Home » Spring-Framework-090522 » org.springframework » beans » factory » [javadoc | source]
org.springframework.beans.factory
public interface: BeanFactoryAware [javadoc | source] 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 .

Method from org.springframework.beans.factory.BeanFactoryAware Summary:
setBeanFactory
Method from org.springframework.beans.factory.BeanFactoryAware Detail:
 public  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.