Interface AutowireCapableBeanFactory

All Superinterfaces:
BeanFactory
All Known Subinterfaces:
ConfigurableListableBeanFactory
All Known Implementing Classes:
AbstractAutowireCapableBeanFactory, DefaultListableBeanFactory

public interface AutowireCapableBeanFactory extends BeanFactory
Extension of the BeanFactory interface to be implemented by bean factories that are capable of autowiring, provided that they want to expose this functionality for existing bean instances.

This subinterface of BeanFactory is not meant to be used in normal application code: stick to BeanFactory or ListableBeanFactory for typical use cases.

Integration code for other frameworks can leverage this interface to wire and populate existing bean instances that Spring does not control the lifecycle of. This is particularly useful for WebWork Actions and Tapestry Page objects, for example.

Note that this interface is not implemented by ApplicationContext facades, as it is hardly ever used by application code. That said, it is available from an application context too, accessible through ApplicationContext's ApplicationContext.getAutowireCapableBeanFactory() method.

You may also implement the BeanFactoryAware interface, which exposes the internal BeanFactory even when running in an ApplicationContext, to get access to an AutowireCapableBeanFactory: simply cast the passed-in BeanFactory to AutowireCapableBeanFactory.

Since:
04.12.2003
Author:
Juergen Hoeller
See Also: