Search in sources :

Example 11 with Transform

use of soot.Transform in project soot by Sable.

the class MyMain method main.

public static void main(String[] args) {
    PackManager.v().getPack("jtp").add(new Transform("jtp.myTransform", new BodyTransformer() {

        protected void internalTransform(Body body, String phase, Map options) {
            new MyAnalysis(new ExceptionalUnitGraph(body));
            // use G.v().out instead of System.out so that Soot can
            // redirect this output to the Eclipse console
            G.v().out.println(body.getMethod());
        }
    }));
    soot.Main.main(args);
}
Also used : ExceptionalUnitGraph(soot.toolkits.graph.ExceptionalUnitGraph) BodyTransformer(soot.BodyTransformer) Transform(soot.Transform) Body(soot.Body) Map(java.util.Map)

Example 12 with Transform

use of soot.Transform in project soot by Sable.

the class LineNumberGenerator method main.

public static void main(String[] argv) {
    // if you do not want soot to output new class files, run with comman line option "-f n"
    // if you want the source code line numbers for jimple statements, use this:
    PackManager.v().getPack("jtp").add(new Transform("jtp.lnprinter", new LineNumberGenerator().bln));
    // if you want the source code line numbers for baf instructions, use this:
    PackManager.v().getPack("bb").add(new Transform("bb.lnprinter", new LineNumberGenerator().bln));
    soot.Main.main(argv);
}
Also used : Transform(soot.Transform)

Example 13 with Transform

use of soot.Transform in project soot by Sable.

the class DumpNumAppReachableMethods method main.

/**
 * @param args
 */
public static void main(String[] args) {
    PackManager.v().getPack("wjtp").add(new Transform("wjtp.narm", new DumpNumAppReachableMethods()));
    soot.Main.main(args);
}
Also used : Transform(soot.Transform)

Aggregations

Transform (soot.Transform)13 Map (java.util.Map)5 Body (soot.Body)3 SceneTransformer (soot.SceneTransformer)3 SootMethod (soot.SootMethod)3 Unit (soot.Unit)3 ArrayList (java.util.ArrayList)2 BodyTransformer (soot.BodyTransformer)2 Pack (soot.Pack)2 Stmt (soot.jimple.Stmt)2 InterproceduralCFG (heros.InterproceduralCFG)1 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1 LinkedHashSet (java.util.LinkedHashSet)1 CompilationDeathException (soot.CompilationDeathException)1 HasPhaseOptions (soot.HasPhaseOptions)1 MethodOrMethodContext (soot.MethodOrMethodContext)1 SootClass (soot.SootClass)1 InterfaceInvokeExpr (soot.jimple.InterfaceInvokeExpr)1 InvokeExpr (soot.jimple.InvokeExpr)1