class InstantiationModelAwarePointcutAdvisorImpl extends java.lang.Object implements InstantiationModelAwarePointcutAdvisor, AspectJPrecedenceInformation
| Modifier and Type | Class and Description |
|---|---|
private class |
InstantiationModelAwarePointcutAdvisorImpl.PerTargetInstantiationModelPointcut
Pointcut implementation that changes its behaviour when the advice is instantiated.
|
| Modifier and Type | Field and Description |
|---|---|
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 |
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE| Constructor and Description |
|---|
InstantiationModelAwarePointcutAdvisorImpl(AspectJAdvisorFactory af,
AspectJExpressionPointcut ajexp,
MetadataAwareAspectInstanceFactory aif,
java.lang.reflect.Method method,
int declarationOrderInAspect,
java.lang.String aspectName) |
| Modifier and Type | Method and Description |
|---|---|
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()
Get the order value of this object.
|
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() |
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
public InstantiationModelAwarePointcutAdvisorImpl(AspectJAdvisorFactory af, AspectJExpressionPointcut ajexp, MetadataAwareAspectInstanceFactory aif, java.lang.reflect.Method method, int declarationOrderInAspect, java.lang.String aspectName)
public Pointcut getPointcut()
getPointcut in interface PointcutAdvisorpublic boolean isPerInstance()
true
means here is that the aspect is not a SINGLETON.isPerInstance in interface Advisorpublic AspectMetadata getAspectMetadata()
public Advice getAdvice()
getAdvice in interface Advisororg.aopalliance.intercept.MethodInterceptor,
BeforeAdvice,
ThrowsAdvice,
AfterReturningAdvicepublic boolean isLazy()
InstantiationModelAwarePointcutAdvisorisLazy in interface InstantiationModelAwarePointcutAdvisorpublic boolean isAdviceInstantiated()
InstantiationModelAwarePointcutAdvisorisAdviceInstantiated in interface InstantiationModelAwarePointcutAdvisorprivate Advice instantiateAdvice(AspectJExpressionPointcut pcut)
public MetadataAwareAspectInstanceFactory getAspectInstanceFactory()
public AspectJExpressionPointcut getDeclaredPointcut()
public int getOrder()
OrderedHigher values are interpreted as lower priority. As a consequence,
the object with the lowest value has the highest priority (somewhat
analogous to Servlet load-on-startup values).
Same order values will result in arbitrary sort positions for the affected objects.
getOrder in interface OrderedOrdered.HIGHEST_PRECEDENCE,
Ordered.LOWEST_PRECEDENCEpublic java.lang.String getAspectName()
AspectJPrecedenceInformationgetAspectName in interface AspectJPrecedenceInformationpublic int getDeclarationOrder()
AspectJPrecedenceInformationgetDeclarationOrder in interface AspectJPrecedenceInformationpublic boolean isBeforeAdvice()
AspectJPrecedenceInformationisBeforeAdvice in interface AspectJPrecedenceInformationpublic boolean isAfterAdvice()
AspectJPrecedenceInformationisAfterAdvice in interface AspectJPrecedenceInformationprivate void determineAdviceType()
public java.lang.String toString()
toString in class java.lang.Object