Join Slack
Powered by
is there a way to iterate alle subclasses of a sea...
# announcements
t
thana
02/13/2020, 1:52 PM
is there a way to iterate alle subclasses of a sealed class? i mean... in the end arn't sealed class enums on steroids? i can do that with enums 😉
d
diesieben07
02/13/2020, 1:55 PM
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.reflect/-k-class/sealed-subclasses.html
diesieben07
02/13/2020, 1:55 PM
Note that this requires the reflection library.
☝️ 1
t
thana
02/13/2020, 1:56 PM
ahhh thats why code completion wasn't helpful. thanks 😄
3
Views
Open in Slack
Previous
Next