反射执行get方法:
String fieldName = colums.get(j).getColumid();//fieldName 实体中的参数名
String getter = "get" + fieldName.substring(0, 1).toUpperCase() + fieldName.substring(1);//get后首字母大写
Method curMethod = projectClass.getMethod(getter);
String value = (String) curMethod.invoke(curVO);//curVO实体对象
反射执行set方法:
String fieldName = colums.get(j+1).getColumid();;//fieldName 实体中的参数名
String setter = "set" + fieldName.substring(0, 1).toUpperCase() + fieldName.substring(1);
Method curMethod = projectClass.getMethod(setter, String.class);;//get后首字母大写
curMethod.invoke(curVO, value);//curVO实体对象、value:set的参数值