摘要:
反射方式获取成员变量并使用 Field对象 域(属性,成员变量)对象,属于java.base模块,java.lang.reflect包中 通过Class对象获取属性 getField(String name) //返回一个Field对象,仅公共属性 getDeclaredField(String n 阅读全文
摘要:
反射方式获取成员方法并使用 Method对象 方法对象,属于java.base模块,java.lang.refect包 通过Class对象获取方法 getMethod(String name,Class<T>...parameterType) //返回一个Method对象,仅公共成员方法 getDe 阅读全文
摘要:
反射方式获取构造方法并使用 Constructor<T>对象 构造器对象,属于java.base模块,java.lang.reflect包中 getConstructor(Class <?>... parameterType) //返回公共构造方法 getDeclaredConstructor(Cl 阅读全文