I created an AbstractFoo
reference class and several subclasses, now I want to get all the names of the subclasses (AFoo
, BFoo
, CFoo
). It seems this is possible using the subclasses
slot of an S4 class, but I'd like to get the same sort of thing for a reference class.
For instance my code might be:
AbstractFoo <- setRefClass("AbstractFoo")
AFoo <- setRefClass("AFoo", contains = c("AbstractFoo"))
BFoo <- setRefClass("BFoo", contains = c("AbstractFoo"))
CFoo <- setRefClass("CFoo", contains = c("AbstractFoo"))
So I would want something that returns c("AFoo", "BFoo", "CFoo")
.