1 .
Constructor getConstructor(Class[] params) – 获得使用特殊的参数类型的公共构造函数,
Constructor[] getConstructors() – 获得类的所有公共构造函数
Constructor getDeclaredConstructor(Class[] params) – 获得使用特定参数类型的构造函数(与接入级别无关)
Constructor[] getDeclaredConstructors() – 获得类的所有构造函数(与接入级别无关)
2.
Field getField(String name) – 获得命名的公共字段
Field[] getFields() – 获得类的所有公共字段
Field getDeclaredField(String name) – 获得类声明的命名的字段
Field[] getDeclaredFields() – 获得类声明的所有字段
3.
Method getMethod(String name, Class[] params) – 使用特定的参数类型,获得命名的公共方法
Method[] getMethods() – 获得类的所有公共方法
Method getDeclaredMethod(String name, Class[] params) – 使用特写的参数类型,获得类声明的命名的方法
Method[] getDeclaredMethods() – 获得类声明的所有方法
简单说就是给你一个字符串“A”,你可以得到类A的信息,产生实例,调用A的方法…