code: private int idToInt(String value) {
      try {
        return Integer.valueOf(value);
      } catch (NumberFormatException e) {
        throw new ConfigurationException("invalid type ID: " + value);
      }
    }
docs: Converts a string to an integer.