//获取对象指定类型的构造器 Constructor con = target.getClass().getDeclaredConstructor(String.class, int.class);//获取对象的所有构造器Constructor [] con = target.getClass().getDeclaredConstructors();//获取对象的构造器的参数类型Class[] parameterTypes = con.getParameterTypes();
本文共 289 字,大约阅读时间需要 1 分钟。
//获取对象指定类型的构造器 Constructor con = target.getClass().getDeclaredConstructor(String.class, int.class);//获取对象的所有构造器Constructor [] con = target.getClass().getDeclaredConstructors();//获取对象的构造器的参数类型Class[] parameterTypes = con.getParameterTypes();
转载于:https://my.oschina.net/u/1866821/blog/364765