code: public static Object str2TargetClass(String strField, Class<?> clazz) {
          if (null == strField || "".equals(strField))
              return null;
          if ((Long.class == clazz) || (long.class == clazz)) {
              strField = matchDoneBigDecimal(strField);
              strField = RegularUtils.converNumByReg(strField);
              return Long.parseLong(strField);
          }
          if ((Integer.class == clazz) || (int.class == clazz)) {
              strField = matchDoneBigDecimal(strField);
              strField = RegularUtils.converNumByReg(strField);
              return Integer.parseInt(strField);
          }
          if ((Float.class == clazz) || (float.class == clazz)) {
              strField = matchDoneBigDecimal(strField);
              return Float.parseFloat(strField);
          }
          if ((Double.class == clazz) || (double.class == clazz)) {
              strField = matchDoneBigDecimal(strField);
              return Double.parseDouble(strField);
          }
          if ((Character.class == clazz) || (char.class == clazz)) {
              return strField.toCharArray()[0];
          }
          if ((Boolean.class == clazz) || (boolean.class == clazz)) {
              return Boolean.parseBoolean(strField);
          }
          if (Date.class == clazz) {
              return DateUtils.str2DateUnmatch2Null(strField);
          }
          return strField;
      }
docs: 字符串转对象
  
  @param strField 字符串
  @param clazz    待转类型
  @return 转换后数据