use of soot.BodyTransformer in project soot by Sable.
the class Main method main.
/**
* @param args
*/
public static void main(String[] args) {
PackManager.v().getPack("jtp").add(new Transform("jtp.fixedie", new BodyTransformer() {
@Override
protected void internalTransform(Body b, String phaseName, Map<String, String> options) {
for (Unit u : b.getUnits()) {
Stmt s = (Stmt) u;
if (s.containsInvokeExpr()) {
InvokeExpr ie = s.getInvokeExpr();
if (FixedMethods.isFixed(ie)) {
System.err.println("+++ " + ie);
yes++;
} else {
System.err.println(" - " + ie);
no++;
}
}
}
}
}));
soot.Main.main(args);
System.err.println("+++ " + yes);
System.err.println(" - " + no);
}
use of soot.BodyTransformer 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);
}
Aggregations