Is there a way to list only those methods of a Reference Class, that were explicitly defined in the class definition (as opposed to those methods inherited by "system classes" such as refObjectGenerator
or envRefClass
)?
Example <- setRefClass(
Class="Example",
fields=list(
),
methods=list(
testMethodA=function() {
"Test method A"
},
testMethodB=function() {
"Test method B"
}
)
)
What you currently get by calling the $methods()
method (see ?setRefClass
):
> Example$methods()
[1] "callSuper" "copy" "export" "field" "getClass"
[6] "getRefClass" "import" "initFields" "show" "testMethodA"
[11] "testMethodB" "trace" "untrace" "usingMethods"
What I'm looking for:
> Example$methods()
[1] "testMethodA" "testMethodB"