code: private static Object convert(Class<?> clazz, String value) {
        /* TODO create a new Converter class and move this method there for reuse */
  
          if (Integer.class.equals(clazz) || int.class.equals(clazz)) {
              return Integer.valueOf(value);
          } else if (Double.class.equals(clazz) || double.class.equals(clazz)) {
              return Double.valueOf(value);
          } else if (Long.class.equals(clazz) || long.class.equals(clazz)) {
              return Long.valueOf(value);
          } else if (Boolean.class.equals(clazz) || boolean.class.equals(clazz)) {
              return Boolean.valueOf(value);
          }
  
          return value;
      }
docs: Converts a String value to the specified class.