Search in sources :

Example 1 with StmtList

use of com.googlecode.dex2jar.ir.stmt.StmtList in project dex2jar by pxb1988.

the class StmtListTest method toStringTest.

@Test
public void toStringTest() {
    StmtList list = new StmtList();
    Local a = nLocal("this");
    Local b = nLocal("b");
    Local c = nLocal("c");
    Local d = nLocal("d");
    LabelStmt L1 = Stmts.nLabel();
    list.add(Stmts.nIdentity(a, nThisRef("La/Some;")));
    list.add(Stmts.nIdentity(b, nParameterRef("I", 0)));
    list.add(Stmts.nIdentity(c, nParameterRef("J", 1)));
    list.add(Stmts.nIdentity(d, nParameterRef("F", 2)));
    list.add(Stmts.nIf(nGt(b, nInt(0), "I"), L1));
    list.add(Stmts.nAssign(c, nCast(d, "F", "J")));
    list.add(L1);
    list.toString();
}
Also used : LabelStmt(com.googlecode.dex2jar.ir.stmt.LabelStmt) Exprs.nLocal(com.googlecode.dex2jar.ir.expr.Exprs.nLocal) Local(com.googlecode.dex2jar.ir.expr.Local) StmtList(com.googlecode.dex2jar.ir.stmt.StmtList) Test(org.junit.Test)

Aggregations

Exprs.nLocal (com.googlecode.dex2jar.ir.expr.Exprs.nLocal)1 Local (com.googlecode.dex2jar.ir.expr.Local)1 LabelStmt (com.googlecode.dex2jar.ir.stmt.LabelStmt)1 StmtList (com.googlecode.dex2jar.ir.stmt.StmtList)1 Test (org.junit.Test)1