摘要: 讓我好好想想,AspectJ中最常用的切入點是什么?哦,也許是call(Method-Signature)吧。這是個相對簡單的方法簽名。實際上,方法簽名的完整形式如下:
[modifiers] [returnTypePattern] [DeclaredTypePattern.]methodName([Parameters])[throws TypePattern],其中方括號中的簽名組件是可選的。modifiers 為修飾符模式,returnTypePattern 為返回類型模式,DeclaredTypePattern 為類型聲明模式,methodName 為方法名稱,Parameters 為方法參數,throws TypePattern 為throw字句。該文僅僅介紹 DeclaredTypePattern,因為相比之下其它模式比較簡單的多。
閱讀全文