Geir
10/24/2017, 7:24 PMClass<? extends Enum>, which I cannot figure out how to get from my Kotlin enum.
I've tried MyEnum, MyEnum.javaClass and MyEnum::class all with/without companion object on MyEnum, all with different compile errors.
How do I get MyEnum's java.lang.Class<? extends java.lang.Enum>?apoorv9990
10/24/2017, 7:28 PMMyEnum::class.java?Geir
10/24/2017, 7:31 PMkarelpeeters
10/24/2017, 8:14 PMx.javaClass means "the class of the instance x", eg. "hey".javaClass == java.lang.String. In your code MyEnum refers to the companion instance, and that's why you get the wrong class.