@Override public void setLeftOp(Value variable) { leftBox.setValue(variable); }
public void convert(DavaBody body) { Iterator it = body.getUnits().iterator(); while (it.hasNext()) { Unit u = (Unit) it.next(); if (u instanceof ThrowStmt) { ValueBox opBox = ((ThrowStmt) u).getOpBox(); Value op = opBox.getValue(); if (op.getType() instanceof NullType) { opBox.setValue(new DNewInvokeExpr(npeRef, null, new ArrayList())); } } } } }
public void endValueBox(ValueBox u) { endOffset = output().length() - lastNewline; if (hasColorTag(u)) { u.addTag(new PositionTag(startOffsets.pop().intValue(), endOffset)); } }
public JAssignStmt(Value variable, Value rvalue) { this(new LinkedVariableBox(variable), new LinkedRValueBox(rvalue)); ((LinkedVariableBox) leftBox).setOtherBox(rightBox); ((LinkedRValueBox) rightBox).setOtherBox(leftBox); if (!leftBox.canContainValue(variable) || !rightBox.canContainValue(rvalue)) { throw new RuntimeException( "Illegal assignment statement. Make sure that either left side or right hand side has a local or constant."); } }
protected void checkThrow(Body b, ThrowStmt ts) { if (isThrowDeclared(b, ((RefType) ts.getOp().getType()).getSootClass()) || isThrowFromCompiler(ts) || isExceptionCaught(b, ts, (RefType) ts.getOp().getType())) { return; } if (reporter != null) { reporter.reportError(new ExceptionCheckerError(b.getMethod(), ((RefType) ts.getOp().getType()).getSootClass(), ts, (SourceLnPosTag) ts.getOpBox().getTag("SourceLnPosTag"))); } }
private soot.jimple.BinopExpr updateTags(soot.jimple.BinopExpr binary, ASTNode binaryLocation, soot.Value op1, soot.Value op2) { createTag(binary, binaryLocation); soot.tagkit.Tag op1tag = getTag(op1); if(op1tag != null) binary.getOp1Box().addTag(op1tag); soot.tagkit.Tag op2tag = getTag(op2); if(op2tag != null) binary.getOp2Box().addTag(op2tag); return binary; }
public List<Value> getBootstrapArgs() { List l = new ArrayList(); for (ValueBox element : bsmArgBoxes) { l.add(element.getValue()); } return l; }
@Override public void setOp(Value op) { opBox.setValue(op); }
public soot.jimple.StaticInvokeExpr newStaticInvokeExpr(SootMethodRef method, java.util.List args, ASTNode location) { soot.jimple.StaticInvokeExpr expr = Jimple.v().newStaticInvokeExpr(method, args); createTag(expr, location); for(int i = 0; i < args.size(); i++) { soot.tagkit.Tag tag = getTag((Value)args.get(i)); if(tag != null) expr.getArgBox(i).addTag(tag); } return expr; }
@Override public void setOp(Value op) { opBox.setValue(op); }
public soot.jimple.InterfaceInvokeExpr newInterfaceInvokeExpr(Local base, SootMethodRef method, java.util.List args, ASTNode location) { soot.jimple.InterfaceInvokeExpr expr = Jimple.v().newInterfaceInvokeExpr(base, method, args); createTag(expr, location); for(int i = 0; i < args.size(); i++) { soot.tagkit.Tag tag = getTag((Value)args.get(i)); if(tag != null) expr.getArgBox(i).addTag(tag); } return expr; }