public a(int b){}method.invoke(o, new Interger(123));

解决方案 »

  1.   

    首先把int转为Integer对象然后用reflection机制调用Integer对象的intValue方法该方法返回就是一个指向int的Object,与Integer有本质的区别!!!
      

  2.   

    Class[] paratype = {String.class,Integer.class};修改成:
    Class[] paratype = {String.class,int.class};
    就可以执行了。
      

  3.   

    你传入的参数类型不对。Class[] paratype = {String.class,Integer.class};
    ---->
    Class[] paratype = {String.class,Integer.TYPE};