摘要: Class c = Class.forName("main.Main$MyClass"); //要包名+类名 Object obj = c.newInstance(); MyClass mc = (MyClass)obj; Field[] fields = c.getDeclaredFields();//拿到数据成员 Method[] methods = c.getMethods();//拿到函... 阅读全文