Is there a way to set an alternative name for an e...
# announcements
f
Is there a way to set an alternative name for an enum member for Java users?
@JvmName
does not seem to be usable. 🤔
Copy code
enum class E {
    // @JvmName("FOO_BAR") :(
    `foo-bar`
}
The only workaround I could think of was through the addition of a companion object with `@JvmField`s where I repeat each member.