Method met = value.getMethod("GOGO",String.class,int.class) ;public Method getMethod(String name,
Class<?>... parameterTypes)
throws NoSuchMethodException,
SecurityException事情是这样的,这个取得Class类有3种方法,其中一种就是 类.class
但是,大家看上面的代码里面那个为什么是int.class 而不是Integer.class
就算是自动装箱,但却是错的,唯有int.class是对的
下面的那个是原函数
Class<?>... parameterTypes)
throws NoSuchMethodException,
SecurityException事情是这样的,这个取得Class类有3种方法,其中一种就是 类.class
但是,大家看上面的代码里面那个为什么是int.class 而不是Integer.class
就算是自动装箱,但却是错的,唯有int.class是对的
下面的那个是原函数
int.class和Integer.class都是java.lang.Class类的实例,拆什么拆,装什么装