Suppose I have:
Foo <- R6::R6Class("Foo")
Bar1 <- R6::R6Class("Bar1", inherit = "Foo")
Bar2 <- R6::R6Class("Bar2", inherit = "Foo")
f <- Foo$new()
A. Can I do something like
R6::findChildren("Foo")
[1] "Bar1" "Bar2"
(I think this the same as R, R6, Get Full Class Name from R6Generator Object, but including it to be comprehensive)
B. Can I do something like
R6::findInstances("Foo")
[1] "f"
C. Can I do something like
b1 <- Bar1$new()
b2 <- Bar2$new()
R6::findInstances("Foo")
[1] "f" "b1" "b2"