|
|
|
@ -112,33 +112,27 @@ public class JobInvokeUtil
|
|
|
|
|
}
|
|
|
|
|
String[] methodParams = methodStr.split(",(?=([^\"']*[\"'][^\"']*[\"'])*[^\"']*$)");
|
|
|
|
|
List<Object[]> classs = new LinkedList<>();
|
|
|
|
|
for (int i = 0; i < methodParams.length; i++)
|
|
|
|
|
{
|
|
|
|
|
String str = StringUtils.trimToEmpty(methodParams[i]);
|
|
|
|
|
for (String methodParam : methodParams) {
|
|
|
|
|
String str = StringUtils.trimToEmpty(methodParam);
|
|
|
|
|
// String字符串类型,以'或"开头
|
|
|
|
|
if (StringUtils.startsWithAny(str, "'", "\""))
|
|
|
|
|
{
|
|
|
|
|
classs.add(new Object[] { StringUtils.substring(str, 1, str.length() - 1), String.class });
|
|
|
|
|
if (StringUtils.startsWithAny(str, "'", "\"")) {
|
|
|
|
|
classs.add(new Object[]{StringUtils.substring(str, 1, str.length() - 1), String.class});
|
|
|
|
|
}
|
|
|
|
|
// boolean布尔类型,等于true或者false
|
|
|
|
|
else if ("true".equalsIgnoreCase(str) || "false".equalsIgnoreCase(str))
|
|
|
|
|
{
|
|
|
|
|
classs.add(new Object[] { Boolean.valueOf(str), Boolean.class });
|
|
|
|
|
else if ("true".equalsIgnoreCase(str) || "false".equalsIgnoreCase(str)) {
|
|
|
|
|
classs.add(new Object[]{Boolean.valueOf(str), Boolean.class});
|
|
|
|
|
}
|
|
|
|
|
// long长整形,以L结尾
|
|
|
|
|
else if (StringUtils.endsWith(str, "L"))
|
|
|
|
|
{
|
|
|
|
|
classs.add(new Object[] { Long.valueOf(StringUtils.substring(str, 0, str.length() - 1)), Long.class });
|
|
|
|
|
else if (StringUtils.endsWith(str, "L")) {
|
|
|
|
|
classs.add(new Object[]{Long.valueOf(StringUtils.substring(str, 0, str.length() - 1)), Long.class});
|
|
|
|
|
}
|
|
|
|
|
// double浮点类型,以D结尾
|
|
|
|
|
else if (StringUtils.endsWith(str, "D"))
|
|
|
|
|
{
|
|
|
|
|
classs.add(new Object[] { Double.valueOf(StringUtils.substring(str, 0, str.length() - 1)), Double.class });
|
|
|
|
|
else if (StringUtils.endsWith(str, "D")) {
|
|
|
|
|
classs.add(new Object[]{Double.valueOf(StringUtils.substring(str, 0, str.length() - 1)), Double.class});
|
|
|
|
|
}
|
|
|
|
|
// 其他类型归类为整形
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
classs.add(new Object[] { Integer.valueOf(str), Integer.class });
|
|
|
|
|
else {
|
|
|
|
|
classs.add(new Object[]{Integer.valueOf(str), Integer.class});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return classs;
|
|
|
|
|