// 3) change the project to OPAL-DeveloperTools (`project OPAL-DeveloperTools`)
// 4) start the scala console (`console`)
// 5) <paste in the following code>
-import org.opalj.io.write
+import org.opalj.io.writeAndOpen
import org.opalj.util.PerformanceEvaluation.time
-val f = new java.io.File("<THE JAR FILE>")
+val f = new java.io.File("<THE JAR/CLASS FILE>")
val p = org.opalj.br.analyses.Project(f)
-p.parForeachMethodWithBody(parallelizationLevel=32){ mi =>
+ p.parForeachMethodWithBody(parallelizationLevel=32){ mi =>
- // Create representation
- val (code,_) = org.opalj.tac.AsQuadruples(mi.method,p.classHierarchy)
+ // Create representation
+ val (code,_) = org.opalj.tac.AsQuadruples(mi.method,p.classHierarchy)
- // Convert to JavaLike text based representation
- val tac = ToJavaLike(code)
- val fileNamePrefix = mi.classFile.thisType.toJava+"."+mi.method.name
- val file = write(tac, fileNamePrefix, ".tac.txt")
+ // Convert to JavaLike text based representation
+ val tac = ToJavaLike(code)
+ val fileNamePrefix = mi.classFile.thisType.toJava+"."+mi.method.name
+ val file = writeAndOpen(tac, fileNamePrefix, ".tac.txt")
}(t => println("Analysis time: "+t.toSeconds))