-
Notifications
You must be signed in to change notification settings - Fork 0
/
CallGraphBySpoon.java
36 lines (23 loc) · 976 Bytes
/
CallGraphBySpoon.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package fr.kriszt.theo.spoon.main;
import fr.kriszt.theo.GraphX.SpoonMethodsGrapher;
import java.util.Set;
public class CallGraphBySpoon {
public static String PROJECT_PATH = "lib/SimpleSample/company/src/com/company";
public static void main( String[] args) {
if (args.length > 0){
PROJECT_PATH = args[0];
}
SpoonCallRecognizer<Void> spoonInstance = new SpoonCallRecognizer<>(PROJECT_PATH);
spoonInstance.runScan();
System.out.println("Types déclarés : " + spoonInstance.classes);
System.out.println("Appels : \n");
for (String k : spoonInstance.methodsCalls.keySet()){
Set<String> callees = spoonInstance.methodsCalls.get(k);
System.out.println("\t" + k);
for (String v : callees){
System.out.println("\t\t" + v);
}
}
new SpoonMethodsGrapher( spoonInstance.classes, spoonInstance.methodsCalls);
}
}