Package com.tonic.analysis.ssa.value
Class IntConstant
- java.lang.Object
-
- com.tonic.analysis.ssa.value.Constant
-
- com.tonic.analysis.ssa.value.IntConstant
-
-
Field Summary
Fields Modifier and Type Field Description static IntConstantMINUS_ONEstatic IntConstantONEstatic IntConstantZERO
-
Constructor Summary
Constructors Constructor Description IntConstant(int value)Creates an integer constant with the given value.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)IRTypegetType()Gets the IR type of this value.IntegergetValue()Gets the value of this constant.inthashCode()static IntConstantof(int value)Creates an integer constant, using cached instances for common values.StringtoString()-
Methods inherited from class com.tonic.analysis.ssa.value.Constant
isConstant
-
Methods inherited from interface com.tonic.analysis.ssa.value.Value
isNull, isSSAValue
-
-
-
-
Field Detail
-
ZERO
public static final IntConstant ZERO
-
ONE
public static final IntConstant ONE
-
MINUS_ONE
public static final IntConstant MINUS_ONE
-
-
Method Detail
-
of
public static IntConstant of(int value)
Creates an integer constant, using cached instances for common values.- Parameters:
value- the integer value- Returns:
- an IntConstant instance
-
getType
public IRType getType()
Description copied from interface:ValueGets the IR type of this value.- Returns:
- the IR type
-
getValue
public Integer getValue()
Description copied from class:ConstantGets the value of this constant.
-
-