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
(@NonNull V v) Called when this object is visited.@NonNull BooleanConstant
and
(@NonNull BooleanConstant c) @NonNull BooleanConstant
equalEqual
(@NonNull BooleanConstant c) static BooleanConstant
getFalse()
static BooleanConstant
getInstance
(boolean value) static BooleanConstant
getInstance
(int value) static BooleanConstant
getTrue()
@NonNull Type
getType()
Returns the Soot type of this Value.@NonNull BooleanConstant
notEqual
(@NonNull BooleanConstant c) @NonNull BooleanConstant
or
(@NonNull BooleanConstant c) toString()
@NonNull BooleanConstant
xor
(@NonNull BooleanConstant c) 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
-