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
周銳 閱讀(312)
評論(0) 編輯 收藏 所屬分類:
AspectJ