|
bumzJul 13, 2019 via iPhone
1
Reflection
|
|
lavvrenceJul 19, 2019
2
同楼上,反射.
``` 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
多谢 @bumz @jaylee4869
|