code: public static String getName(EnumConstant constant) {
          String name = constant.getName();
          String underscored = Formatter.toUnderscoreCase(name);
          return Formatter.toUpperCase(underscored);
      }
docs: Returns constant name for java enum.