|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.aop.aspectj.annotation.InstantiationModelAwarePointcutAdvisorImpl
class InstantiationModelAwarePointcutAdvisorImpl
Internal implementation of AspectJPointcutAdvisor. Note that there will be one instance of this advisor for each target method.
Nested Class Summary | |
---|---|
private class |
InstantiationModelAwarePointcutAdvisorImpl.PerTargetInstantiationModelPointcut
Pointcut implementation that changes its behaviour when the advice is instantiated. |
Field Summary | |
---|---|
private MetadataAwareAspectInstanceFactory |
aspectInstanceFactory
|
private java.lang.String |
aspectName
|
private AspectJAdvisorFactory |
atAspectJAdvisorFactory
|
private int |
declarationOrder
|
private AspectJExpressionPointcut |
declaredPointcut
|
private Advice |
instantiatedAdvice
|
private java.lang.Boolean |
isAfterAdvice
|
private java.lang.Boolean |
isBeforeAdvice
|
private boolean |
lazy
|
private java.lang.reflect.Method |
method
|
private Pointcut |
pointcut
|
Fields inherited from interface org.springframework.core.Ordered |
---|
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE |
Constructor Summary | |
---|---|
InstantiationModelAwarePointcutAdvisorImpl(AspectJAdvisorFactory af,
AspectJExpressionPointcut ajexp,
MetadataAwareAspectInstanceFactory aif,
java.lang.reflect.Method method,
int declarationOrderInAspect,
java.lang.String aspectName)
|
Method Summary | |
---|---|
private void |
determineAdviceType()
Duplicates some logic from getAdvice, but importantly does not force creation of the advice. |
Advice |
getAdvice()
Lazily instantiate advice if necessary. |
MetadataAwareAspectInstanceFactory |
getAspectInstanceFactory()
|
AspectMetadata |
getAspectMetadata()
Return the AspectJ AspectMetadata for this advisor. |
java.lang.String |
getAspectName()
The name of the aspect (bean) in which the advice was declared. |
int |
getDeclarationOrder()
The declaration order of the advice member within the aspect. |
AspectJExpressionPointcut |
getDeclaredPointcut()
|
int |
getOrder()
Return the order value of this object, with a higher value meaning greater in terms of sorting. |
Pointcut |
getPointcut()
The pointcut for Spring AOP to use. |
private Advice |
instantiateAdvice(AspectJExpressionPointcut pcut)
|
boolean |
isAdviceInstantiated()
Return whether this advisor has already instantiated its advice. |
boolean |
isAfterAdvice()
Return whether this is an after advice. |
boolean |
isBeforeAdvice()
Return whether this is a before advice. |
boolean |
isLazy()
Return whether this advisor is lazily initializing its underlying advice. |
boolean |
isPerInstance()
This is only of interest for Spring AOP: AspectJ instantiation semantics are much richer. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private final AspectJExpressionPointcut declaredPointcut
private Pointcut pointcut
private final MetadataAwareAspectInstanceFactory aspectInstanceFactory
private final java.lang.reflect.Method method
private final boolean lazy
private final AspectJAdvisorFactory atAspectJAdvisorFactory
private Advice instantiatedAdvice
private int declarationOrder
private java.lang.String aspectName
private java.lang.Boolean isBeforeAdvice
private java.lang.Boolean isAfterAdvice
Constructor Detail |
---|
public InstantiationModelAwarePointcutAdvisorImpl(AspectJAdvisorFactory af, AspectJExpressionPointcut ajexp, MetadataAwareAspectInstanceFactory aif, java.lang.reflect.Method method, int declarationOrderInAspect, java.lang.String aspectName)
Method Detail |
---|
public Pointcut getPointcut()
getPointcut
in interface PointcutAdvisor
public boolean isPerInstance()
true
means here is that the aspect is not a SINGLETON.
isPerInstance
in interface Advisor
public AspectMetadata getAspectMetadata()
public Advice getAdvice()
getAdvice
in interface Advisor
org.aopalliance.intercept.MethodInterceptor
,
BeforeAdvice
,
ThrowsAdvice
,
AfterReturningAdvice
public boolean isLazy()
InstantiationModelAwarePointcutAdvisor
isLazy
in interface InstantiationModelAwarePointcutAdvisor
public boolean isAdviceInstantiated()
InstantiationModelAwarePointcutAdvisor
isAdviceInstantiated
in interface InstantiationModelAwarePointcutAdvisor
private Advice instantiateAdvice(AspectJExpressionPointcut pcut)
public MetadataAwareAspectInstanceFactory getAspectInstanceFactory()
public AspectJExpressionPointcut getDeclaredPointcut()
public int getOrder()
Ordered
Normally starting with 0, with Integer.MAX_VALUE
indicating the greatest value. Same order values will result
in arbitrary positions for the affected objects.
Higher values can be interpreted as lower priority. As a consequence, the object with the lowest value has highest priority (somewhat analogous to Servlet "load-on-startup" values).
getOrder
in interface Ordered
public java.lang.String getAspectName()
AspectJPrecedenceInformation
getAspectName
in interface AspectJPrecedenceInformation
public int getDeclarationOrder()
AspectJPrecedenceInformation
getDeclarationOrder
in interface AspectJPrecedenceInformation
public boolean isBeforeAdvice()
AspectJPrecedenceInformation
isBeforeAdvice
in interface AspectJPrecedenceInformation
public boolean isAfterAdvice()
AspectJPrecedenceInformation
isAfterAdvice
in interface AspectJPrecedenceInformation
private void determineAdviceType()
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |