类 SimpleBeanFactoryAwareAspectInstanceFactory
- java.lang.Object
- org.springframework.aop.config.SimpleBeanFactoryAwareAspectInstanceFactory
- 所有已实现的接口:
AspectInstanceFactory
,Aware
,BeanFactoryAware
,Ordered
public class SimpleBeanFactoryAwareAspectInstanceFactory extends Object implements AspectInstanceFactory, BeanFactoryAware
Implementation ofAspectInstanceFactory
that locates the aspect from theBeanFactory
using a configured bean name.- 从以下版本开始:
- 2.0
- 作者:
- Rob Harrop, Juergen Hoeller
字段概要
从接口继承的字段 org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
构造器概要
构造器 构造器 说明 SimpleBeanFactoryAwareAspectInstanceFactory()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 ClassLoader
getAspectClassLoader()
Expose the aspect class loader that this factory uses.Object
getAspectInstance()
Look up the aspect bean from theBeanFactory
and returns it.int
getOrder()
Get the order value of this object.void
setAspectBeanName(String aspectBeanName)
Set the name of the aspect bean.void
setBeanFactory(BeanFactory beanFactory)
Callback that supplies the owning factory to a bean instance.
构造器详细资料
SimpleBeanFactoryAwareAspectInstanceFactory
public SimpleBeanFactoryAwareAspectInstanceFactory()
方法详细资料
setAspectBeanName
public void setAspectBeanName(String aspectBeanName)
Set the name of the aspect bean. This is the bean that is returned when callinggetAspectInstance()
.
setBeanFactory
public void setBeanFactory(BeanFactory beanFactory)
从接口复制的说明:BeanFactoryAware
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.- 指定者:
setBeanFactory
在接口中BeanFactoryAware
- 参数:
beanFactory
- owning BeanFactory (nevernull
). The bean can immediately call methods on the factory.- 另请参阅:
BeanInitializationException
getAspectInstance
public Object getAspectInstance()
Look up the aspect bean from theBeanFactory
and returns it.- 指定者:
getAspectInstance
在接口中AspectInstanceFactory
- 返回:
- the aspect instance (never
null
) - 另请参阅:
setAspectBeanName(java.lang.String)
getAspectClassLoader
public ClassLoader getAspectClassLoader()
从接口复制的说明:AspectInstanceFactory
Expose the aspect class loader that this factory uses.- 指定者:
getAspectClassLoader
在接口中AspectInstanceFactory
- 返回:
- the aspect class loader (never
null
)
getOrder
public int getOrder()
从接口复制的说明:Ordered
Get the order value of this object.Higher 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
在接口中Ordered
- 返回:
- the order value
- 另请参阅:
Ordered.HIGHEST_PRECEDENCE
,Ordered.LOWEST_PRECEDENCE