teedee
09/07/2016, 4:29 PMinline fun <reified T: Enum<T>> fromBitFlags(bitFlags: BitFlags) {
val test = EnumSet.allOf(T::class.java)
}
So I found this way to get all values of an enum generically, but I want to replace Enum<T> with something more specific so I can access a shared value. I thought of using an interface and having that implement Enum<T> but Enum<T> is an abstract class so that isn't possible and when I try making the interface an abstract class I have to pass name and ordinal arguments to the constructor of Enum<T> which I don't have. Any idea on how to do this?