switch クラス : Signature ゲッタ
説明
ハンドラのシグネチャを返します。
構文
instance.Signature
引数
無し。
返り値
| クラス | 説明 |
| string | ハンドラのシグネチャ。 |
サンプルコード
次のクラス定義があるとします。
| 1: | class handle |
| 2: | open method void LCHandler(dictionary dic) |
| 3: | ... // event handler code. |
| 4: | endmethod |
| 5: | endclass |
Signature ゲッターの使い方は次のとおりです。
| 1: | browser b = new browser(); |
| 2: | handle h = new handle(); |
| 3: | switch sw = b.LoadCompleted(h,"LCHandler(dictionary)"); // It sets the instance of the handle class. |
| 4: | m.Show(sw.Signature); // "LCHandler(dictionary)" |
注意
シグネチャは switch がハンドラを呼び出すための情報です。ハンドラのメソッド名と引数を連結した文字列になります。
ハンドラは dictionary を引数に持つ open メソッドである必要があるので、ハンドラのメソッド名が "handlerName"の場合、シグネチャは次のようになります。
"handlerName(dictionary)"
参照リンク
無し。


