package ch.usi.inf.sp.callgraph; import ch.usi.inf.sp.framework.ArchiveScanner; import java.io.File; import java.io.IOException; /** * Invoke like this... *
* java App test-input/pacman-src.jar *
* to produce .... * Afterwards, go to the test-output folder, and call... *
* dot -Tpdf -ograph.pdf graph.dot *
* ...to produce a file graph.pdf of the call graph.
*
* MAKE SURE YOU MANUALLY VERIFY FOR EACH METHOD THAT
* THE CALL GRAPH IT'S ACTUALLY CORRECT.
*/
public final class App {
public static void main(final String[] args) throws IOException {
for (final String arg : args) {
System.out.println(arg);
}
final ArchiveScanner scanner = new ArchiveScanner();
// phase 1: build inheritance hierarchy
final ClassHierarchyBuilder classHierarchyBuilder = new ClassHierarchyBuilder();
scanner.addAnalyzer(classHierarchyBuilder);
for (int i=0; i