https://kotlinlang.org logo
j

Jacky

09/14/2023, 3:34 PM
Hello, how to check if enum variable which is of type
KClass<out Enum<*>>
implement specific interface, since I need to access its methods? It worked via
is
when I used
Class
instead of
KClass
. I could use
isSubclassOf
but this does not perform casting and casting manually using
as
throws a
ClassCastExceptionError
. Thanks.
3 Views