public class AspectMetadata
extends java.lang.Object
implements java.io.Serializable
Uses AspectJ 5 AJType reflection API, enabling us to work with different AspectJ instantiation models such as "singleton", "pertarget" and "perthis".
AspectJExpressionPointcut
,
Serialized FormConstructor and Description |
---|
AspectMetadata(java.lang.Class<?> aspectClass,
java.lang.String aspectName)
Create a new AspectMetadata instance for the given aspect class.
|
Modifier and Type | Method and Description |
---|---|
AjType<?> |
getAjType()
Return AspectJ reflection information.
|
java.lang.Class<?> |
getAspectClass()
Return the aspect class.
|
java.lang.String |
getAspectName()
Return the aspect class.
|
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".
|
public AspectMetadata(java.lang.Class<?> aspectClass, java.lang.String aspectName)
aspectClass
- the aspect classaspectName
- the name of the aspectpublic AjType<?> getAjType()
public java.lang.Class<?> getAspectClass()
public java.lang.String getAspectName()
public Pointcut getPerClausePointcut()
Pointcut.TRUE
if it's a singleton).public boolean isPerThisOrPerTarget()
public boolean isPerTypeWithin()
public boolean isLazilyInstantiated()