类 SimpleAspectInstanceFactory
- java.lang.Object
- org.springframework.aop.aspectj.SimpleAspectInstanceFactory
- 所有已实现的接口:
AspectInstanceFactory
,Ordered
public class SimpleAspectInstanceFactory extends Object implements AspectInstanceFactory
Implementation ofAspectInstanceFactory
that creates a new instance of the specified aspect class for everygetAspectInstance()
call.- 从以下版本开始:
- 2.0.4
- 作者:
- Juergen Hoeller
字段概要
从接口继承的字段 org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
构造器概要
构造器 构造器 说明 SimpleAspectInstanceFactory(Class<?> aspectClass)
Create a new SimpleAspectInstanceFactory for the given aspect class.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 Class<?>
getAspectClass()
Return the specified aspect class (nevernull
).ClassLoader
getAspectClassLoader()
Expose the aspect class loader that this factory uses.Object
getAspectInstance()
Create an instance of this factory's aspect.int
getOrder()
Determine the order for this factory's aspect instance, either an instance-specific order expressed through implementing theOrdered
interface, or a fallback order.protected int
getOrderForAspectClass(Class<?> aspectClass)
Determine a fallback order for the case that the aspect instance does not express an instance-specific order through implementing theOrdered
interface.
构造器详细资料
SimpleAspectInstanceFactory
public SimpleAspectInstanceFactory(Class<?> aspectClass)
Create a new SimpleAspectInstanceFactory for the given aspect class.- 参数:
aspectClass
- the aspect class
方法详细资料
getAspectClass
public final Class<?> getAspectClass()
Return the specified aspect class (nevernull
).
getAspectInstance
public final Object getAspectInstance()
从接口复制的说明:AspectInstanceFactory
Create an instance of this factory's aspect.- 指定者:
getAspectInstance
在接口中AspectInstanceFactory
- 返回:
- the aspect instance (never
null
)
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()
Determine the order for this factory's aspect instance, either an instance-specific order expressed through implementing theOrdered
interface, or a fallback order.- 指定者:
getOrder
在接口中Ordered
- 返回:
- the order value
- 另请参阅:
Ordered
,getOrderForAspectClass(java.lang.Class<?>)
getOrderForAspectClass
protected int getOrderForAspectClass(Class<?> aspectClass)
Determine a fallback order for the case that the aspect instance does not express an instance-specific order through implementing theOrdered
interface.The default implementation simply returns
Ordered.LOWEST_PRECEDENCE
.- 参数:
aspectClass
- the aspect class