adviceexecution()切入點(diǎn)用于捕獲在應(yīng)用程序內(nèi)執(zhí)行任何通知的連接點(diǎn)。語法:
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("--------------------------------------------------");
}
}