Package me.hackware.api.util
Class EnumNames
java.lang.Object
me.hackware.api.util.EnumNames
Returns the original display name for an enum constant.
In dev builds, returns
e.name().
In obfuscated builds, the ASM pass injects a $DN field (String[]) into each
enum class containing the original constant names; this utility reads it via reflection.-
Method Summary
-
Method Details
-
of
-
fromName
Reverse lookup: find the enum constant whoseof(java.lang.Enum<?>)name matches the given string. Also falls back toEnum.valueOfso both original and obfuscated names work.
-