org.springframework.aop.config
Class SimpleBeanFactoryAwareAspectInstanceFactory
java.lang.Object
org.springframework.aop.config.SimpleBeanFactoryAwareAspectInstanceFactory
- All Implemented Interfaces:
- AspectInstanceFactory, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.core.Ordered
public class SimpleBeanFactoryAwareAspectInstanceFactory
- extends java.lang.Object
- implements AspectInstanceFactory, org.springframework.beans.factory.BeanFactoryAware
Implementation of AspectInstanceFactory
that locates the aspect from the
BeanFactory
using a configured bean name.
- Since:
- 2.0
- Author:
- Rob Harrop, Juergen Hoeller
Fields inherited from interface org.springframework.core.Ordered |
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE |
Method Summary |
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()
|
void |
setAspectBeanName(java.lang.String aspectBeanName)
Set the name of the aspect bean. |
void |
setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleBeanFactoryAwareAspectInstanceFactory
public SimpleBeanFactoryAwareAspectInstanceFactory()
setAspectBeanName
public void setAspectBeanName(java.lang.String aspectBeanName)
- Set the name of the aspect bean. This is the bean that is returned when calling
getAspectInstance()
.
setBeanFactory
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
- Specified by:
setBeanFactory
in interface org.springframework.beans.factory.BeanFactoryAware
getAspectInstance
public java.lang.Object getAspectInstance()
- Look up the aspect bean from the
BeanFactory
and returns it.
- Specified by:
getAspectInstance
in interface AspectInstanceFactory
- Returns:
- the aspect instance (never
null
) - See Also:
setAspectBeanName(java.lang.String)
getAspectClassLoader
public java.lang.ClassLoader getAspectClassLoader()
- Description copied from interface:
AspectInstanceFactory
- Expose the aspect class loader that this factory uses.
- Specified by:
getAspectClassLoader
in interface AspectInstanceFactory
- Returns:
- the aspect class loader (never
null
)
getOrder
public int getOrder()
- Specified by:
getOrder
in interface org.springframework.core.Ordered