consider following classes structure in Kotlin:
open class Base {
...
}
class A : Base() {
...
}
class B : Base() {
...
}
...
class Z : Base() {
...
}
How would I go around getting a list of ALL classes (A
-Z
in this particular example) that inherit from Base
class?
I tried using reflection with BaseTest::class.nestedClasses
and other reflection properties but they don't seem to be finding number of extending classes properly.
Aucun commentaire:
Enregistrer un commentaire