Package soot.jimple
Class FloatConstant
- java.lang.Object
-
- soot.jimple.Constant
-
- soot.jimple.NumericConstant
-
- soot.jimple.RealConstant
-
- soot.jimple.FloatConstant
-
- All Implemented Interfaces:
Serializable,EquivTo,Immediate,ConvertToBaf,Switchable,Value
public class FloatConstant extends RealConstant
Floating point constant with single precision.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static FloatConstantONEfloatvaluestatic FloatConstantZERO
-
Constructor Summary
Constructors Modifier Constructor Description protectedFloatConstant(float value)
-
Method Summary
-
Methods inherited from class soot.jimple.Constant
clone, convertToBaf, equivHashCode, equivTo, getUseBoxes, toString
-
-
-
-
Field Detail
-
ZERO
public static final FloatConstant ZERO
-
ONE
public static final FloatConstant ONE
-
value
public final float value
-
-
Method Detail
-
v
public static FloatConstant v(float value)
-
hashCode
public int hashCode()
Returns a hash code for this FloatConstant object.
-
add
public NumericConstant add(NumericConstant c)
- Specified by:
addin classNumericConstant
-
subtract
public NumericConstant subtract(NumericConstant c)
- Specified by:
subtractin classNumericConstant
-
multiply
public NumericConstant multiply(NumericConstant c)
- Specified by:
multiplyin classNumericConstant
-
divide
public NumericConstant divide(NumericConstant c)
- Specified by:
dividein classNumericConstant
-
remainder
public NumericConstant remainder(NumericConstant c)
- Specified by:
remainderin classNumericConstant
-
equalEqual
public NumericConstant equalEqual(NumericConstant c)
- Specified by:
equalEqualin classNumericConstant
-
notEqual
public NumericConstant notEqual(NumericConstant c)
- Specified by:
notEqualin classNumericConstant
-
isLessThan
public boolean isLessThan(NumericConstant c)
- Specified by:
isLessThanin classNumericConstant
-
lessThan
public NumericConstant lessThan(NumericConstant c)
- Specified by:
lessThanin classNumericConstant
-
lessThanOrEqual
public NumericConstant lessThanOrEqual(NumericConstant c)
- Specified by:
lessThanOrEqualin classNumericConstant
-
greaterThan
public NumericConstant greaterThan(NumericConstant c)
- Specified by:
greaterThanin classNumericConstant
-
greaterThanOrEqual
public NumericConstant greaterThanOrEqual(NumericConstant c)
- Specified by:
greaterThanOrEqualin classNumericConstant
-
cmpg
public IntConstant cmpg(RealConstant constant)
Description copied from class:RealConstantPerforms the indicated floating point comparison. ForNaNcomparisons1is returned.- Specified by:
cmpgin classRealConstant- Parameters:
constant- the value to compare with- Returns:
0if values are equal,1if passed value less, or-1if passed value greater. When any of the values isNaNmethod returns1.
-
cmpl
public IntConstant cmpl(RealConstant constant)
Description copied from class:RealConstantPerforms the indicated floating point comparison. ForNaNcomparisons-1is returned.- Specified by:
cmplin classRealConstant- Parameters:
constant- the value to compare with- Returns:
0if values are equal,1if passed value less, or-1if passed value greater. When any of the values isNaNmethod returns-1.
-
negate
public NumericConstant negate()
- Specified by:
negatein classNumericConstant
-
getType
public Type getType()
Description copied from interface:ValueReturns the Soot type of this Value.
-
apply
public void apply(Switch sw)
Description copied from interface:SwitchableCalled when this object is visited.
-
getNumericValue
public Number getNumericValue()
- Specified by:
getNumericValuein classNumericConstant
-
-