return false; return ((DoubleConstantValueTag) t).getDoubleValue() == ((DoubleConstant) rightOp).value; } else if (t instanceof FloatConstantValueTag) { if (!(rightOp instanceof FloatConstant)) {
double val = ((DoubleConstantValueTag) f.getTag("DoubleConstantValueTag")).getDoubleValue(); value = new Double(val); } else if (fieldType instanceof FloatType && f.hasTag("FloatConstantValueTag")) {
double val = ((DoubleConstantValueTag) f.getTag("DoubleConstantValueTag")).getDoubleValue(); finalFields.put(new Double(val), f); } else if (fieldType instanceof FloatType && f.hasTag("FloatConstantValueTag")) {
double val = ((DoubleConstantValueTag) f.getTag("DoubleConstantValueTag")).getDoubleValue(); out.println(" " + declaration + " = " + val + ";");
} else if (t instanceof DoubleConstantValueTag) { DoubleConstantValueTag d = (DoubleConstantValueTag) t; return new ImmutableDoubleEncodedValue(d.getDoubleValue()); } else if (t instanceof FloatConstantValueTag) { FloatConstantValueTag f = (FloatConstantValueTag) t;
fieldString += " = "; DoubleConstantValueTag val = (DoubleConstantValueTag) field.getTag("DoubleConstantValueTag"); fieldString += doubleToString(val.getDoubleValue());
/** * Get default value of a field for constant pool * * @param field * Field to get default value for * @return Default value or <code>null</code> if there is no default value. */ public static Object getDefaultValue(SootField field) { if (field.hasTag("StringConstantValueTag")) { /* * Default value for string may only be returned if the field is of type String or a sub-type. */ if (acceptsStringInitialValue(field)) { return ((StringConstantValueTag) field.getTag("StringConstantValueTag")).getStringValue(); } } else if (field.hasTag("IntegerConstantValueTag")) { return ((IntegerConstantValueTag) field.getTag("IntegerConstantValueTag")).getIntValue(); } else if (field.hasTag("LongConstantValueTag")) { return ((LongConstantValueTag) field.getTag("LongConstantValueTag")).getLongValue(); } else if (field.hasTag("FloatConstantValueTag")) { return ((FloatConstantValueTag) field.getTag("FloatConstantValueTag")).getFloatValue(); } else if (field.hasTag("DoubleConstantValueTag")) { return ((DoubleConstantValueTag) field.getTag("DoubleConstantValueTag")).getDoubleValue(); } return null; }
Constant constant = null; if (t instanceof DoubleConstantValueTag) { double value = ((DoubleConstantValueTag) t).getDoubleValue(); constant = DoubleConstant.v(value); } else if (t instanceof FloatConstantValueTag) {