processorURL

Map amMap = PublicPattern.amMap;

String url = request.getRequestURI().toString();
String queryString = request.getQueryString();

System.out.println("url - " + url);
System.out.println("queryString - " + queryString);

String m = "";
String a = "";
String c11 = "";

if (queryString != null ) {
if (queryString.indexOf("callMethod") == -1) {
m = "method";
} else {
m = "callMethod";
}
c11 = request.getParameter(m);
}else{

c11 = getCallMethodName(form);

}


if (url != null){

String[] urls = url.split("/");
a = urls[urls.length-1];
a = a.substring(0, a.length()-3);

}



System.out.println("ActionName - " + a + "  MethodNmae - " + c11);

ArrayList metList = (ArrayList) amMap.get(a);

 Method metd = null;
 String fdname = null;
if(metList != null && c11 != null){
for(int i=0; i < metList.size() ; i++){
if(metList.get(i).equals(c11)){

System.out.println("find ActionName -- " + a);
System.out.println("find MethodNmae -- " + c11);

Class clazz = form.getClass();// 获取集合中的对象类型
Field[] fds = clazz.getDeclaredFields();// 获取他的字段数组 
Method[] methods = clazz.getMethods(); 


for (int z=0;z< methods.length;z++) { 

String methodName = methods[z].getName(); 
 if (!methodName.startsWith("get")) { 
  continue; 
 } 

try {
 
 
Object obj;
obj = methods[z].invoke(form,null);
if("'".equals(obj)){
System.out.println(methodName + "find ---- '");

methodName = "set" + methodName.substring(3);

//metd = clazz.getMethod("set" + change(fdname), null);
Class[] cl=new Class[]{String.class};
metd = clazz.getMethod(methodName, cl);

Object[] o = {"''"};

metd.invoke(form, o);
}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值