请问下面代码中Type属性我应该如何用?
Method [] methods=c.getMethods();
int i=0;
for(Method m : methods){
Type[] type=m.getGenericParameterTypes();
System.out.println(++i+"次");
for(Type t : type){
System.out.println("t="+t);
m.invoke(c.newInstance(),null);
}
}
Method [] methods=c.getMethods();
int i=0;
for(Method m : methods){
Type[] type=m.getGenericParameterTypes();
System.out.println(++i+"次");
for(Type t : type){
System.out.println("t="+t);
m.invoke(c.newInstance(),null);
}
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货