Is there a way to list only those methods of the reference class that were explicitly defined in the class definition (as opposed to those methods that are inherited by "system classes" such as refObjectGeneratoror envRefClass)?
Example <- setRefClass(
Class="Example",
fields=list(
),
methods=list(
testMethodA=function() {
"Test method A"
},
testMethodB=function() {
"Test method B"
}
)
)
What you are currently getting by calling a method $methods()(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"
source
share