类 AspectMetadata
java.lang.Object
infra.aop.aspectj.annotation.AspectMetadata
- 所有已实现的接口:
Serializable
Metadata for an AspectJ aspect class, with an additional Framework 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".
- 从以下版本开始:
- 4.0
- 作者:
- Rod Johnson, Juergen Hoeller, Harry Yang
- 另请参阅:
-
字段概要
字段修饰符和类型字段说明private AjType<?>AspectJ reflection information (AspectJ 5 / Java 5 specific).private final Class<?>The aspect class, stored separately for re-resolution of the corresponding AjType on deserialization.private final StringThe name of this aspect as defined to Framework (the bean name) - allows us to determine if two pieces of advice come from the same aspect and hence their relative precedence.private final PointcutFramework AOP pointcut corresponding to the per clause of the aspect.private static final long -
构造器概要
构造器构造器说明AspectMetadata(Class<?> aspectClass, String aspectName) Create a new AspectMetadata instance for the given aspect class. -
方法概要
修饰符和类型方法说明private StringfindPerClause(Class<?> aspectClass) Extract contents from String of formpertarget(contents).AjType<?>Return AspectJ reflection information.Class<?>Return the aspect class.Return the aspect name.Return a Framework pointcut expression for a singleton aspect.booleanReturn whether the aspect needs to be lazily instantiated.booleanReturn whether the aspect is defined as "perthis" or "pertarget".booleanReturn whether the aspect is defined as "pertypewithin".private voidreadObject(ObjectInputStream inputStream)
-
字段详细资料
-
serialVersionUID
private static final long serialVersionUID- 另请参阅:
-
aspectName
The name of this aspect as defined to Framework (the bean name) - allows us to determine if two pieces of advice come from the same aspect and hence their relative precedence. -
aspectClass
The aspect class, stored separately for re-resolution of the corresponding AjType on deserialization. -
ajType
AspectJ reflection information (AspectJ 5 / Java 5 specific). Re-resolved on deserialization since it isn't serializable itself. -
perClausePointcut
Framework AOP pointcut corresponding to the per clause of the aspect. Will be the Pointcut.TRUE canonical instance in the case of a singleton, otherwise an AspectJExpressionPointcut.
-
-
构造器详细资料
-
AspectMetadata
Create a new AspectMetadata instance for the given aspect class.- 参数:
aspectClass- the aspect classaspectName- the name of the aspect
-
-
方法详细资料
-
findPerClause
Extract contents from String of formpertarget(contents). -
getAjType
Return AspectJ reflection information. -
getAspectClass
Return the aspect class. -
getAspectName
Return the aspect name. -
getPerClausePointcut
Return a Framework pointcut expression for a singleton aspect. (e.g.Pointcut.TRUEif 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. -
readObject
-