![](https://cos-cdn.shuashuati.com/pipixue-wap/2020-1230-1107-53/ti_inject-812ce.png)
考虑下面这个简单的例子,让我们看看reflection是如何工作的。 import javA.lang.reflect.*; public class DumpMethods{ public static void main(String[] args) { try { Class c=Class.forName(args[0]); Method m[]=C.getDeclaredMethods(); for (int i = 0; i < m.length; i++) { System.out.println(m[i].toString()); } } catch (Throwable e) { System.err.println(e); } } } 其中"C.getDeclaredMethods"的作用是: