adviceexecution()切入点用于捕获在应用程序内执行任何通知的连接点。语法:
pointcut <pointcut name>() : adviceexecution();
public aspect AdviceExecutionRecipe {
pointcut adviceExecutionPointcut() : adviceexecution();
before() : adviceExecutionPointcut() && !within(AdviceExecutionRecipe +) {
System.out.println("-------------- Aspect Advice Logic ---------------");
System.out.println("In the advice picked by ExecutionRecipe");
System.out.println("Signature: " + thisJoinPoint.getStaticPart().getSignature());
System.out.println("Source Line: " + thisJoinPoint.getStaticPart().getSourceLocation());
System.out.println("--------------------------------------------------");
}
}
posted on 2007-07-03 17:18
周锐 阅读(306)
评论(0) 编辑 收藏 所属分类:
AspectJ