質問編集履歴

1

listMethodsを追加しました

2018/10/21 08:34

投稿

tanaka_hana
tanaka_hana

スコア19

test CHANGED
File without changes
test CHANGED
@@ -70,6 +70,22 @@
70
70
 
71
71
 
72
72
 
73
+ public static void listMethods(Class<?> clazz) {
74
+
75
+ System.out.println("メソッドの一覧を表示します.");
76
+
77
+ Method[] methods = clazz.getDeclaredMethods();
78
+
79
+ for(Method m : methods) {
80
+
81
+ System.out.println(m.getName());
82
+
83
+ }
84
+
85
+ }
86
+
87
+
88
+
73
89
  public static void launchExternal(Class<?> clazz) throws Exception {
74
90
 
75
91
  ProcessBuilder pb = new ProcessBuilder("java", clazz.getName());