class Dog{ private List<SmallDog> sons; public void setSons(List<SmallDog> sons){ this.sons = sons; } }
Method m = Dog.class.getMethod("setSons",List.class); right
Method m = Dog.class.getMethod("setSons",ArrayList.class) wrong
我将reflect简单封装了一下,结果遇到了一个问题,查了半天才发现是这里出错了,记录下来
如果有谁能告诉我这是为什么 非常感谢