code: public static String javaOneofConstantName(Field field) {
          String name = field.getName();
          String underscored = Formatter.toUnderscoreCase(name);
          return Formatter.toUpperCase(underscored);
      }
docs: Returns an one-of enum constant name for oneof field.