クラス定義で明示的に定義された参照クラスのメソッドのみをリストする方法はありますかrefObjectGenerator
( またはなどの「システム クラス」によって継承されるメソッドとは対照的envRefClass
です)。
Example <- setRefClass(
Class="Example",
fields=list(
),
methods=list(
testMethodA=function() {
"Test method A"
},
testMethodB=function() {
"Test method B"
}
)
)
メソッドを呼び出して現在取得している$methods()
もの (「 」を参照?setRefClass
):
> Example$methods()
[1] "callSuper" "copy" "export" "field" "getClass"
[6] "getRefClass" "import" "initFields" "show" "testMethodA"
[11] "testMethodB" "trace" "untrace" "usingMethods"
私が探しているもの:
> Example$methods()
[1] "testMethodA" "testMethodB"