初始化参数列表的方法:
java 代码 private void saveQueryParamValue(int position, Object obj) { String strValue; if (obj instanceof String || obj instanceof Date) { // if we have a String or Date , include '' in the saved value strValue = "'" + obj + "'"; } else { if (obj == null) { // convert null to the string null strValue = "null"; } else { // unknown object (includes all Numbers), just call toString strValue = obj.toString(); } } // if we are setting a position larger than current size of parameterValues, first make it larger while (position >= parameterValues.size()) { parameterValues.add(null); } // save the parameter parameterValues.set(position, strValue); } 相关资源:自动抢茅台脚本.zip