<@U5089N1RB> As <@U0CD02F9P> said, Java can't tell...
# announcements
l
@stantronic As @kevinmost said, Java can't tell you the subclasses of a given class, but it can tell you if a class is a subclass, so you can lookup at every classes, and filter the ones that are subclasses, as @dragas just said, but it is very inefficient, so you better use Kotlin reflection if it has, or hardcode it, or use enums if it fits. BTW, it seems you're not the first who wanted to look for subclasses: https://stackoverflow.com/a/45479267/4433326 You could narrow down the lookup to the classes inside the package of the sealed class, or the parent sealed class (looking only for the inner classes)