posts - 431,  comments - 344,  trackbacks - 0
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

只有注册用户登录后才能发表评论。


网站导航: