code: public EnumT valueOfStrict(String constant) {
      EnumT value = knownValues.get(constant);
      if (value != null) {
        return value;
      } else {
        throw new IllegalArgumentException(
            "Constant \"" + constant + "\" not found for enum \"" + clazz.getName() + "\"");
      }
    }
docs: Get the enum object for the given String constant, and throw an exception if the constant is
  not recognized.