public NumericConstant divide(NumericConstant c) { if (!(c instanceof IntConstant)) { throw new IllegalArgumentException("IntConstant expected"); } return IntConstant.v(this.value / ((IntConstant) c).value); }
public NumericConstant remainder(NumericConstant c) { if (!(c instanceof IntConstant)) { throw new IllegalArgumentException("IntConstant expected"); } return IntConstant.v(this.value % ((IntConstant) c).value); }
public NumericConstant lessThan(NumericConstant c) { if (!(c instanceof IntConstant)) { throw new IllegalArgumentException("IntConstant expected"); } return IntConstant.v((this.value < ((IntConstant) c).value) ? 1 : 0); }
public ArithmeticConstant or(ArithmeticConstant c) { if (!(c instanceof IntConstant)) { throw new IllegalArgumentException("IntConstant expected"); } return IntConstant.v(this.value | ((IntConstant) c).value); }
public ArithmeticConstant shiftRight(ArithmeticConstant c) { if (!(c instanceof IntConstant)) { throw new IllegalArgumentException("IntConstant expected"); } return IntConstant.v(this.value >> ((IntConstant) c).value); }
public NumericConstant lessThan(NumericConstant c) { if (!(c instanceof LongConstant)) { throw new IllegalArgumentException("LongConstant expected"); } return IntConstant.v((this.value < ((LongConstant) c).value) ? 1 : 0); }
public NumericConstant notEqual(NumericConstant c) { if (!(c instanceof IntConstant)) { throw new IllegalArgumentException("IntConstant expected"); } return IntConstant.v((this.value != ((IntConstant) c).value) ? 1 : 0); }
public NumericConstant greaterThan(NumericConstant c) { if (!(c instanceof IntConstant)) { throw new IllegalArgumentException("IntConstant expected"); } return IntConstant.v((this.value > ((IntConstant) c).value) ? 1 : 0); }
public ArithmeticConstant xor(ArithmeticConstant c) { if (!(c instanceof IntConstant)) { throw new IllegalArgumentException("IntConstant expected"); } return IntConstant.v(this.value ^ ((IntConstant) c).value); }
public NumericConstant lessThanOrEqual(NumericConstant c) { if (!(c instanceof IntConstant)) { throw new IllegalArgumentException("IntConstant expected"); } return IntConstant.v((this.value <= ((IntConstant) c).value) ? 1 : 0); }
public NumericConstant equalEqual(NumericConstant c) { if (!(c instanceof LongConstant)) { throw new IllegalArgumentException("LongConstant expected"); } return IntConstant.v((this.value == ((LongConstant) c).value) ? 1 : 0); }
public NumericConstant lessThanOrEqual(NumericConstant c) { if (!(c instanceof LongConstant)) { throw new IllegalArgumentException("LongConstant expected"); } return IntConstant.v((this.value <= ((LongConstant) c).value) ? 1 : 0); }
@Override public NumericConstant notEqual(NumericConstant c) { assertInstanceOf(c); return IntConstant.v(Float.compare(this.value, ((FloatConstant) c).value) != 0 ? 1 : 0); }
@Override public NumericConstant greaterThan(NumericConstant c) { assertInstanceOf(c); return IntConstant.v(Float.compare(this.value, ((FloatConstant) c).value) > 0 ? 1 : 0); }
@Override public NumericConstant equalEqual(NumericConstant c) { assertInstanceOf(c); return IntConstant.v(Float.compare(this.value, ((FloatConstant) c).value) == 0 ? 1 : 0); }
@Override public NumericConstant lessThan(NumericConstant c) { assertInstanceOf(c); return IntConstant.v(Double.compare(this.value, ((DoubleConstant) c).value) < 0 ? 1 : 0); }
public Object clone() { int lookupValueCount = getLookupValues().size(); List clonedLookupValues = new ArrayList(lookupValueCount); for (int i = 0; i < lookupValueCount; i++) { clonedLookupValues.add(i, IntConstant.v(getLookupValue(i))); } return new GLookupSwitchStmt(Grimp.cloneIfNecessary(getKey()), clonedLookupValues, getTargets(), getDefaultTarget()); }
private void convertIincInsn(IincInsnNode insn) { Local local = getLocal(insn.var); assignReadOps(local); if (!units.containsKey(insn)) { AddExpr add = Jimple.v().newAddExpr(local, IntConstant.v(insn.incr)); setUnit(insn, Jimple.v().newAssignStmt(local, add)); } }