No, because the methods in a reference class "inherited" from the parent are actually copied into the class when it is generated.
setRefClass("Example", methods = list(
a = function() {},
b = function() {}
))
class <- getClass("Example")
ls(class@refMethods)
#> [1] "a" "b" "callSuper" "copy" "export"
#> [6] "field" "getClass" "getRefClass" "import" "initFields"
#> [11] "show" "trace" "untrace" "usingMethods"
But you can find out the method also defined in the parent and return those:
parent <- getClass(class@refSuperClasses)
ls(parent@refMethods)
#> [1] "callSuper" "copy" "export" "field" "getClass"
#> [6] "getRefClass" "import" "initFields" "show" "trace"
#> [11] "untrace" "usingMethods"
(note that I'm ignoring the possibility that your class has multiple parents, but that would be easy to generalise)
And then use setdiff()
to find the difference
setdiff(ls(class@refMethods), ls(parent@refMethods))
#> [1] "a" "b"