public static void main(String[] args) { Class clazz = TransferController.class;
Method[] methods = clazz.getDeclaredMethods();
for (Method method : methods) {
System.out.println(method.getName());
}
}
Java反射获取类方法
public static void main(String[] args) { Class clazz = TransferController.class;
Method[] methods = clazz.getDeclaredMethods();
for (Method method : methods) {
System.out.println(method.getName());
}
}
662

被折叠的 条评论
为什么被折叠?