1 2 3 4 5 6 7 8 9 10 11 12 13
package moe.nea.firm interface EnumRenderer<E: Any> { fun getName(option: ManagedOption<E>, value: E): String companion object { fun <E: Enum<E>> default() = object: EnumRenderer<E> { override fun getName(option: ManagedOption<E>, value: E): String { return value.name.lowercase() } } } }