1. 捕獲特定類中的所有連接點
使用within(TypePattern)切入點,利用TypePattern指定特定類類型模式。語法:
pointcut <pointcut name>(<any values to be picked up>) : within(<class>);
2. 捕獲特定方法內的所有連接點
使用withincode(Signature)切入點。語法:
pointcut <pointcut name>(<any values to be picked up>) : withincode(<modifier> <class>.<method>(<parameter types>));