Class BooleanConstant
java.lang.Object
sootup.core.jimple.common.constant.BooleanConstant
- All Implemented Interfaces:
EquivTo,ComparableConstant<BooleanConstant>,Constant,LogicalConstant<BooleanConstant>,Immediate,Value,JimpleIR,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 BooleanConstantand(@NonNull BooleanConstant c) @NonNull BooleanConstantequalEqual(@NonNull BooleanConstant c) static BooleanConstantgetFalse()static BooleanConstantgetInstance(boolean value) static BooleanConstantgetInstance(int value) static BooleanConstantgetTrue()@NonNull TypegetType()Returns the Soot type of this Value.@NonNull BooleanConstantnotEqual(@NonNull BooleanConstant c) @NonNull BooleanConstantor(@NonNull BooleanConstant c) toString()@NonNull BooleanConstantxor(@NonNull BooleanConstant c) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface sootup.core.jimple.common.constant.Constant
equivHashCode, equivTo, getUses, toString
-
Method Details
-
getInstance
-
getInstance
-
getTrue
-
getFalse
-
getType
Description copied from interface:ValueReturns the Soot type of this Value. -
accept
Description copied from interface:AcceptorCalled when this object is visited.- Specified by:
acceptin interfaceAcceptor<ConstantVisitor>
-
equalEqual
- Specified by:
equalEqualin interfaceComparableConstant<BooleanConstant>
-
notEqual
- Specified by:
notEqualin interfaceComparableConstant<BooleanConstant>
-
and
- Specified by:
andin interfaceLogicalConstant<BooleanConstant>
-
or
- Specified by:
orin interfaceLogicalConstant<BooleanConstant>
-
xor
- Specified by:
xorin interfaceLogicalConstant<BooleanConstant>
-
toString
-