Internal implementation of AspectJPointcutAdvisor.
Note that there will be one instance of this advisor for each target method.
| Method from org.springframework.aop.aspectj.annotation.InstantiationModelAwarePointcutAdvisorImpl Detail: |
public synchronized Advice getAdvice() {
if (this.instantiatedAdvice == null) {
this.instantiatedAdvice = instantiateAdvice(this.declaredPointcut);
}
return this.instantiatedAdvice;
}
Lazily instantiate advice if necessary. |
public MetadataAwareAspectInstanceFactory getAspectInstanceFactory() {
return this.aspectInstanceFactory;
}
|
public AspectMetadata getAspectMetadata() {
return this.aspectInstanceFactory.getAspectMetadata();
}
Return the AspectJ AspectMetadata for this advisor. |
public String getAspectName() {
return this.aspectName;
}
|
public int getDeclarationOrder() {
return this.declarationOrder;
}
|
public AspectJExpressionPointcut getDeclaredPointcut() {
return this.declaredPointcut;
}
|
public int getOrder() {
return this.aspectInstanceFactory.getOrder();
}
|
public Pointcut getPointcut() {
return this.pointcut;
}
The pointcut for Spring AOP to use. Actual behaviour of the pointcut will change
depending on the state of the advice. |
public synchronized boolean isAdviceInstantiated() {
return (this.instantiatedAdvice != null);
}
|
public boolean isAfterAdvice() {
if (this.isAfterAdvice == null) {
determineAdviceType();
}
return this.isAfterAdvice;
}
|
public boolean isBeforeAdvice() {
if (this.isBeforeAdvice == null) {
determineAdviceType();
}
return this.isBeforeAdvice;
}
|
public boolean isLazy() {
return this.lazy;
}
|
public boolean isPerInstance() {
return (getAspectMetadata().getAjType().getPerClause().getKind() != PerClauseKind.SINGLETON);
}
This is only of interest for Spring AOP: AspectJ instantiation semantics
are much richer. In AspectJ terminology, all a return of true
means here is that the aspect is not a SINGLETON. |
public String toString() {
return "InstantiationModelAwarePointcutAdvisor: expression [" + getDeclaredPointcut().getExpression() +
"]; advice method [" + this.method + "]; perClauseKind=" +
this.aspectInstanceFactory.getAspectMetadata().getAjType().getPerClause().getKind();
}
|