OSDN Git Service

Changed "for" description.
[soba/JavaAnalysisToolsDemo.git] / JavaAnalysisToolsDemo / src / demo / wala / ClassHierarchyPerformance.java
index 0390cfb..da88cd0 100644 (file)
@@ -29,8 +29,7 @@ public class ClassHierarchyPerformance {
                AnalysisOptions options = new AnalysisOptions(scope, entrypoints);\r
                CallGraphBuilder builder = Util.makeZeroCFABuilder(options, new AnalysisCache(), cha, scope);\r
                CallGraph cg = builder.makeCallGraph(options, null);\r
-               for (Iterator<CGNode> itr = cg.iterator(); itr.hasNext();) {\r
-                       CGNode caller = itr.next();\r
+               for (CGNode caller: cg) {\r
                        for (Iterator<CGNode> callees = cg.getSuccNodes(caller); callees.hasNext();) {\r
                                CGNode callee = callees.next();\r
                                IMethod callerMethod = caller.getMethod();\r
@@ -38,6 +37,7 @@ public class ClassHierarchyPerformance {
 //                             System.out.println(callerMethod.toString() + " -> " + calleeMethod.toString());\r
                        }\r
                }\r
+               \r
                long end = System.currentTimeMillis();\r
 \r
                System.err.println((end - start) + " [ms]");\r