public class SimpleBeanFactoryAwareAspectInstanceFactory extends java.lang.Object implements AspectInstanceFactory, BeanFactoryAware
AspectInstanceFactory that locates the aspect from the
BeanFactory using a configured bean name.| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
aspectBeanName |
private BeanFactory |
beanFactory |
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE| Constructor and Description |
|---|
SimpleBeanFactoryAwareAspectInstanceFactory() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.ClassLoader |
getAspectClassLoader()
Expose the aspect class loader that this factory uses.
|
java.lang.Object |
getAspectInstance()
Look up the aspect bean from the
BeanFactory and returns it. |
int |
getOrder()
Get the order value of this object.
|
void |
setAspectBeanName(java.lang.String aspectBeanName)
Set the name of the aspect bean.
|
void |
setBeanFactory(BeanFactory beanFactory)
Callback that supplies the owning factory to a bean instance.
|
private java.lang.String aspectBeanName
private BeanFactory beanFactory
public SimpleBeanFactoryAwareAspectInstanceFactory()
public void setAspectBeanName(java.lang.String aspectBeanName)
getAspectInstance().public void setBeanFactory(BeanFactory beanFactory)
BeanFactoryAwareInvoked after the population of normal bean properties
but before an initialization callback such as
InitializingBean.afterPropertiesSet() or a custom init-method.
setBeanFactory in interface BeanFactoryAwarebeanFactory - owning BeanFactory (never null).
The bean can immediately call methods on the factory.BeanInitializationExceptionpublic java.lang.Object getAspectInstance()
BeanFactory and returns it.getAspectInstance in interface AspectInstanceFactorynull)setAspectBeanName(java.lang.String)public java.lang.ClassLoader getAspectClassLoader()
AspectInstanceFactorygetAspectClassLoader in interface AspectInstanceFactorynull)public int getOrder()
OrderedHigher values are interpreted as lower priority. As a consequence,
the object with the lowest value has the highest priority (somewhat
analogous to Servlet load-on-startup values).
Same order values will result in arbitrary sort positions for the affected objects.
getOrder in interface OrderedOrdered.HIGHEST_PRECEDENCE,
Ordered.LOWEST_PRECEDENCE