@Override public Object clone() { return new JIfStmt(Jimple.cloneIfNecessary(getCondition()), getTarget()); }
@Override public String toString() { Unit t = getTarget(); String target = "(branch)"; if (!t.branches()) { target = t.toString(); } return Jimple.IF + " " + getCondition().toString() + " " + Jimple.GOTO + " " + target; }
@Override public void caseNeExpr(NeExpr expr) { add(Baf.v().newIfNeInst(Baf.v().newPlaceholderInst(getTarget()))); }
/** * Constructs a IfStmt(Condition, Stmt) grammar chunk. */ public IfStmt newIfStmt(Value condition, Unit target) { return new JIfStmt(condition, target); }
private void handleIfStmt(JIfStmt ifStmt, AnalysisInfo in, AnalysisInfo out, AnalysisInfo outBranch) { Value condition = ifStmt.getCondition(); if (condition instanceof JInstanceOfExpr) { // a instanceof X ; if this succeeds, a is not null JInstanceOfExpr expr = (JInstanceOfExpr) condition; handleInstanceOfExpression(expr, in, out, outBranch); } else if (condition instanceof JEqExpr || condition instanceof JNeExpr) { // a==b or a!=b AbstractBinopExpr eqExpr = (AbstractBinopExpr) condition; handleEqualityOrNonEqualityCheck(eqExpr, in, out, outBranch); } }
@Override public void caseLeExpr(LeExpr expr) { add(Baf.v().newIfGeInst(Baf.v().newPlaceholderInst(getTarget()))); }
@Override public void convertToBaf(final JimpleToBafContext context, final List<Unit> out) { Value cond = getCondition(); u = Baf.v().newIfNullInst(Baf.v().newPlaceholderInst(getTarget())); } else if (cond instanceof NeExpr) { u = Baf.v().newIfNonNullInst(Baf.v().newPlaceholderInst(getTarget())); } else { throw new RuntimeException("invalid condition");
/** * Constructs a IfStmt(Condition, UnitBox) grammar chunk. */ public IfStmt newIfStmt(Value condition, UnitBox target) { return new JIfStmt(condition, target); }
public Object clone() { return new JIfStmt(Jimple.cloneIfNecessary(getCondition()), getTarget()); }
@Override public void caseGeExpr(GeExpr expr) { add(Baf.v().newIfGeInst(Baf.v().newPlaceholderInst(getTarget()))); } });
public String toString() { Unit t = getTarget(); String target = "(branch)"; if(!t.branches()) target = t.toString(); return Jimple.IF + " " + getCondition().toString() + " " + Jimple.GOTO + " " + target; }
/** Constructs a IfStmt(Condition, Stmt) grammar chunk. */ public IfStmt newIfStmt(Value condition, Unit target) { return new JIfStmt(condition, target); }
public Object clone() { return new JIfStmt(Jimple.cloneIfNecessary(getCondition()), getTarget()); }
@Override public void caseGeExpr(GeExpr expr) { add(Baf.v().newIfLeInst(Baf.v().newPlaceholderInst(getTarget()))); } });
public String toString() { Unit t = getTarget(); String target = "(branch)"; if(!t.branches()) target = t.toString(); return Jimple.IF + " " + getCondition().toString() + " " + Jimple.GOTO + " " + target; }
/** Constructs a IfStmt(Condition, Stmt) grammar chunk. */ public IfStmt newIfStmt(Value condition, Unit target) { return new JIfStmt(condition, target); }
@Override public void caseLtExpr(LtExpr expr) { add(Baf.v().newIfLtInst(Baf.v().newPlaceholderInst(getTarget()))); }
public IfStmt newIfStmt(Value condition, UnitBox target) { return new JIfStmt(condition, target); }
@Override public void caseNeExpr(NeExpr expr) { add(Baf.v().newIfNeInst(Baf.v().newPlaceholderInst(getTarget()))); }
public IfStmt newIfStmt(Value condition, UnitBox target) { return new JIfStmt(condition, target); }