类 AspectMetadata
- java.lang.Object
- org.springframework.aop.aspectj.annotation.AspectMetadata
- 所有已实现的接口:
Serializable
public class AspectMetadata extends Object implements Serializable
Metadata for an AspectJ aspect class, with an additional Spring AOP pointcut for the per clause.Uses AspectJ 5 AJType reflection API, enabling us to work with different AspectJ instantiation models such as "singleton", "pertarget" and "perthis".
- 从以下版本开始:
- 2.0
- 作者:
- Rod Johnson, Juergen Hoeller
- 另请参阅:
AspectJExpressionPointcut
, 序列化表格
构造器概要
构造器 构造器 说明 AspectMetadata(Class<?> aspectClass, String aspectName)
Create a new AspectMetadata instance for the given aspect class.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 AjType<?>
getAjType()
Return AspectJ reflection information.Class<?>
getAspectClass()
Return the aspect class.String
getAspectName()
Return the aspect name.Pointcut
getPerClausePointcut()
Return a Spring pointcut expression for a singleton aspect.boolean
isLazilyInstantiated()
Return whether the aspect needs to be lazily instantiated.boolean
isPerThisOrPerTarget()
Return whether the aspect is defined as "perthis" or "pertarget".boolean
isPerTypeWithin()
Return whether the aspect is defined as "pertypewithin".
构造器详细资料
AspectMetadata
public AspectMetadata(Class<?> aspectClass, String aspectName)
Create a new AspectMetadata instance for the given aspect class.- 参数:
aspectClass
- the aspect classaspectName
- the name of the aspect
方法详细资料
getAspectClass
public Class<?> getAspectClass()
Return the aspect class.
getAspectName
public String getAspectName()
Return the aspect name.
getPerClausePointcut
public Pointcut getPerClausePointcut()
Return a Spring pointcut expression for a singleton aspect. (e.g.Pointcut.TRUE
if it's a singleton).
isPerThisOrPerTarget
public boolean isPerThisOrPerTarget()
Return whether the aspect is defined as "perthis" or "pertarget".
isPerTypeWithin
public boolean isPerTypeWithin()
Return whether the aspect is defined as "pertypewithin".
isLazilyInstantiated
public boolean isLazilyInstantiated()
Return whether the aspect needs to be lazily instantiated.