|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.beans.factory.wiring.BeanConfigurerSupport
public abstract class BeanConfigurerSupport
Convenient superclass for configurers that can perform Dependency Injection on objects (however they may be created). Typically subclassed by AspectJ aspects.
Subclasses may also need a metadata resolution strategy, in the
BeanWiringInfoResolver
interface. The default implementation looks
for a bean with the same name as the fully-qualified class name. (This is
the default name of the bean in a Spring XML file if the id attribute is
not used.)
Field Summary | |
---|---|
protected Log |
logger
Logger available to subclasses |
Constructor Summary | |
---|---|
BeanConfigurerSupport()
|
Method Summary | |
---|---|
protected void |
configureBean(Object beanInstance)
Configure the bean instance using the given bean name. |
void |
destroy()
Release references to BeanFactory and BeanWiringInfoResolver when application context is destroyed |
void |
setBeanFactory(BeanFactory beanFactory)
DI the Spring application context in which this aspect should configure beans. |
void |
setBeanWiringInfoResolver(BeanWiringInfoResolver beanWiringInfoResolver)
Set the BeanWiringInfoResolver to use. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Log logger
Constructor Detail |
---|
public BeanConfigurerSupport()
Method Detail |
---|
public void setBeanWiringInfoResolver(BeanWiringInfoResolver beanWiringInfoResolver)
As an alternative, consider using annotation-driven bean wiring.
ClassNameBeanWiringInfoResolver
,
AnnotationBeanWiringInfoResolver
public void setBeanFactory(BeanFactory beanFactory)
setBeanFactory
in interface BeanFactoryAware
beanFactory
- owning BeanFactory (may not be null
).
The bean can immediately call methods on the factory.BeanInitializationException
public void destroy()
destroy
in interface DisposableBean
protected void configureBean(Object beanInstance)
Typically called by an aspect, for all bean instances matched by a pointcut.
beanInstance
- the bean instance to configure (must not be null
|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |