Pointcut Descriptor (PCD)

ポイントカットの横に(in detail)と書かれているものには、詳細ページがあります。

ExecutionGroup ( 定義に織り込まれる )

|_ _ _ ScriptExecution (in detail)
|_ _ _ Request
|_ _ _ PageHistory
|_ _ _ FunctionExecution (in detail)
|_ _ _ MethodExecution (in detail)

CallGroup ( 呼び出し箇所に織り込まれる )

|_ _ _ ScriptCall
|_ _ _ FunctionCall
|_ _ _ MethodCall
|_ _ _ ConstructorCall

SetGroup ( 代入する際に織り込まれる )

|_ _ _ GlobalVariableSet
|_ _ _ ArraySet
|_ _ _ FieldSet

GetGroup ( 参照する際に織り込まれる )

|_ _ _ GlobalVariableGet
|_ _ _ ArrayGet
|_ _ _ FieldGet

Condition ( 条件が真となる全てのジョインポイントに織り込まれる )

|_ _ _ If

WithinGroup ( 指定した範囲内の全てのジョインポイントに織り込まれる )

|_ _ _ Within
|_ _ _ Withincode
|_ _ _ WithinGlobal


以下では、現在実装されているものだけをまとめています。今後、増やしていく予定です。

基本のポイントカット記述子(PCD)

ジョインポイント 選択するポイントカット AOWPでの記述例 実装状況
メソッドを呼び出したとき AOWP_MethodCallPointcut(MethodPat) AOWP_MethodCallPointcut('Hoge', 'hoge', 1) 実装済み
関数を呼び出したとき AOWP_FunctionCallPointcut(FuncPat) AOWP_FunctionCallPointcut('hoge', -1) 実装済み
コンストラクタを呼び出したとき AOWP_ConstructorCallPointcut(ContructorPat) AOWP_ConstructorCallPointcut('Hoge', 2) 実装済み
メソッドを実行したとき(定義) AOWP_MethodExecutionPointcut(MethodDefPat) AOWP_MethodExecutionPointcut('public', 'Hoge', 'hoge', 2) 実装済み
関数を実行したとき(定義) AOWP_FunctionExecutionPointcut(FunctionPat) AOWP_FunctionExecutionPointcut('hoge', 2') 実装済み
コンストラクタを実行したとき(定義) AOWP_MethodExecutionPointcut(MethodDefPat) AOWP_MethodExecutionPointcut('public', 'Hoge', 'hoge', 2) 実装済み
フィールドの値の参照したとき AOWP_FieldGetPointcut(FieldPat) AOWP_FieldGetPointcut('Hoge', 'hoge') 実装済み
フィールドへの値の代入したとき AOWP_FieldSetPointcut(FieldPat) AOWP_FieldSetPointcut('Hoge', 'hoge') 実装済み
対象クラスの本体内のジョインポイントを全て選択する。 AOWP_WithinPointcut(ClassName) AOWP_WithinPointcut('Hoge') 実装済み
対象メソッドの本体内のジョインポイントを全て選択する AOWP_WithincodePointcut(MethodDefPat) AOWP_WithincodePointcut('private', 'Hoge', 'hoge', -1) 実装済み
全てのジョインポイントで、boolean式Expressionを評価し、真であるとき、そのジョインポイントを選択する。 AOWP_IfPointcut(Expression) AOWP_IfPointcut('active()') 実装済み

MethodPat :
   クラス名(実行時評価), メソッド名, 引数の数
FuncPat :
   関数名, 引数の数
ConstructorPat :
   クラス名, 引数の数
MethodDefPat :
   修飾子, クラス名, メソッド名, 引数の数
FieldPat :
   クラス名(実行時評価), フィールド名
Expression :
   定数、staticな変数/関数/メソッドのみを用いた条件式

Note:
1. パターンマッチングは(ポイントカット引数のパターン)、preg、もしくはereg系の正規表現が利用できます。
2. 引数の数は「任意」を指定する場合は -1 とします。
3. (定義)と書いてあるものは、実行元の定義そのものを変更することを表しています。

追加された基本のPCD

ジョインポイント 選択するポイントカット AOWPでの記述例 実装状況
グローバル変数へ代入したとき AOWP_GlobalVariableSetPointcut(ValPat) AOWP_GlobalVariableSetPointcut('_SESSION') 実装済み
グローバル変数を参照したとき AOWP_GlobalVariableGetPointcut(ValPat) AOWP_GlobalVariableGetPointcut('Hoge') 実装済み
配列を参照したとき AOWP_ArrayGetPointcut(ArrayPat) AOWP_ArrayGetPointcut('Hoge', 'momo') 実装済み
配列へ代入したとき AOWP_ArraySetPointcut(ArrayPat) AOWP_ArraySetPointcut('_SESSION', 'name') 実装済み
グローバル領域で発生するジョインポイントを全て選択する。 AOWP_WithinGlobalPointcut() AOWP_WithinGlobalPointcut() 実装済み
スクリプトファイルを実行したとき(定義) AOWP_ScriptExecutionPointcut(Path) AOWP_ScriptExecutionPointcut('index.php') 実装済み
スクリプトファイルを呼び出したとき AOWP_ScriptCallPointcut(Path) AOWP_ScriptCallPointcut('index.php') 実装済み

ValPat:
   変数名
ArrayPat:
   配列名, キー名
Path:
   ファイル名(ルートフォルダ (織り込みの基準)から絶対パス)

Web固有のPCD

ジョインポイント 選択するポイントカット AOWPでの記述例 実装状況
GET形式のフォームデータの読み込み AOWP_GetReadPointcut(KeyPat) AOWP_GetReadPointcut('name') 実装済み
POST形式のフォームデータの読み込み AOWP_PostReadPointcut(KeyPat) AOWP_PostReadPointcut('message') 実装済み
セッションデータの書き込み AOWP_SessionWritePointcut(KeyPat) AOWP_SessionWritePointcut('hoge') 実装済み
セッションデータの読み込み AOWP_SessionReadPointcut(KeyPat) AOWP_SessionReadPointcut('piyo') 実装済み
クッキーデータの書き込み AOWP_CookieWritePointcut(KeyPat) AOWP_CookieWritePointcut('nyan') 実装済み
クッキーデータの読み込み AOWP_CookieReadPointcut(KeyPat) AOWP_CookieReadPointcut('momo') 実装済み

KeyPat:    キー名