Class BooleanConstant
java.lang.Object
sootup.core.jimple.common.constant.BooleanConstant
- All Implemented Interfaces:
EquivTo
,Immediate
,Value
,ComparableConstant<BooleanConstant>
,Constant
,LogicalConstant<BooleanConstant>
,Acceptor<ConstantVisitor>
public class BooleanConstant
extends Object
implements LogicalConstant<BooleanConstant>, ComparableConstant<BooleanConstant>
BooleanConstant didn't exist in old soot, because in Java byte code boolean values are
represented as integer values 1 or 0. However, from the source code we have the information if a
constant is boolean or not, adding this class is helpful for setting type of boolean variables.
- Author:
- Linghui Luo
-
Method Summary
Modifier and TypeMethodDescription<V extends ConstantVisitor>
Vaccept
(V v) Called when this object is visited.static BooleanConstant
getFalse()
static BooleanConstant
getInstance
(boolean value) static BooleanConstant
getInstance
(int value) static BooleanConstant
getTrue()
getType()
Returns the Soot type of this Value.toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface sootup.core.jimple.common.constant.Constant
equivHashCode, equivTo, getUses, toString
-
Method Details
-
getInstance
-
getInstance
-
getTrue
-
getFalse
-
getType
Description copied from interface:Value
Returns the Soot type of this Value. -
accept
Description copied from interface:Acceptor
Called when this object is visited.- Specified by:
accept
in interfaceAcceptor<ConstantVisitor>
-
equalEqual
- Specified by:
equalEqual
in interfaceComparableConstant<BooleanConstant>
-
notEqual
- Specified by:
notEqual
in interfaceComparableConstant<BooleanConstant>
-
and
- Specified by:
and
in interfaceLogicalConstant<BooleanConstant>
-
or
- Specified by:
or
in interfaceLogicalConstant<BooleanConstant>
-
xor
- Specified by:
xor
in interfaceLogicalConstant<BooleanConstant>
-
toString
-