运行结果:
public reflect.Test(java.lang.String)
public reflect.Test(int,java.lang.String)
public reflect.Test()
public reflect.Test(int)
跟我定义的顺序不同,既不是正数也不是倒数,那怎么才能准确定位Constructor[]中的元素呢?作者: haixian 时间: 2014-3-28 08:53
public Constructor<T> getConstructor(Class<?>... parameterTypes)你可以通过这个方法得到具体的构造函数。作者: lwy0319 时间: 2014-3-28 16:12
haixian 发表于 2014-3-28 08:53
public Constructor getConstructor(Class... parameterTypes)你可以通过这个方法得到具体的构造函数。 ...