
1 bumz Jul 13, 2019 via iPhone Reflection |
2 lavvrence Jul 19, 2019 同楼上,反射. ``` public static void main(String[] args) throws ClassNotFoundException { Class clazz = Class.forName("com.reflection.People"); Method[] methods = clazz.getDeclaredMethods(); for (Method method : methods) { System.out.println(method.getName()); Parameter[] parameters = method.getParameters(); for (Parameter parameter : parameters) { System.out.println(parameter.getName()); } } } ``` |
3 qwertyegg OP 多谢 @bumz @jaylee4869 |