Package sootup.core.jimple.common.stmt
Class JIfStmt
java.lang.Object
sootup.core.jimple.common.stmt.AbstractStmt
sootup.core.jimple.common.stmt.JIfStmt
- All Implemented Interfaces:
EquivTo,BranchingStmt,FallsThroughStmt,Stmt,Acceptor<StmtVisitor>
If the condition is true, jumps to the target, otherwise continues to the next stmt. The first
successor (index=0) is the fallsthrough Stmt and the second successor (index=1) is the rbanching
one.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intFields inherited from class sootup.core.jimple.common.stmt.AbstractStmt
positionInfo -
Constructor Summary
ConstructorsConstructorDescriptionJIfStmt(@NonNull AbstractConditionExpr condition, @NonNull StmtPositionInfo positionInfo) -
Method Summary
Modifier and TypeMethodDescription<V extends StmtVisitor>
Vaccept(@NonNull V v) Called when this object is visited.booleanbranches()Returns true if execution after this statement does not necessarily continue at the following statement.intReturns a (not necessarily fixed) hash code for this object.booleanequivTo(@NonNull Object o, @NonNull JimpleComparator comparator) Returns true if this object is equivalent to o according to the given comparator.booleanReturns true if execution after this statement may continue at the following statement.@NonNull AbstractConditionExprintReturns the amount of unexceptional successors the Stmt needs to have in the StmtGraph.getTargetStmts(@NonNull Body body) getUses()Returns a list of Values used in this Stmt.booleantoString()voidtoString(@NonNull StmtPrinter stmtPrinter) @NonNull JIfStmtwithCondition(@NonNull AbstractConditionExpr condition) @NonNull JIfStmtwithPositionInfo(@NonNull StmtPositionInfo positionInfo) Methods inherited from class sootup.core.jimple.common.stmt.AbstractStmt
asInvokableStmt, containsArrayRef, containsFieldRef, getArrayRef, getDef, getFieldRef, getPositionInfo, getUsesAndDefs, isInvokableStmt, withNewUseMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface sootup.core.jimple.common.stmt.Stmt
asInvokableStmt, asJAssignStmt, asJBreakpointStmt, asJEnterMonitorStmt, asJExitMonitorStmt, asJGotoStmt, asJIdentityStmt, asJInvokeStmt, asJNopStmt, asJRetStmt, asJReturnStmt, asJReturnVoidStmt, asJSwitchStmt, asJThrowStmt, containsArrayRef, containsFieldRef, getArrayRef, getDef, getFieldRef, getPositionInfo, getUsesAndDefs, isInvokableStmt, isJAssignStmt, isJBreakpointStmt, isJEnterMonitorStmt, isJExitMonitorStmt, isJGotoStmt, isJIdentityStmt, isJInvokeStmt, isJNopStmt, isJRetStmt, isJReturnStmt, isJReturnVoidStmt, isJSwitchStmt, isJThrowStmt, toJAssignStmt, toJBreakpointStmt, toJEnterMonitorStmt, toJExitMonitorStmt, toJGotoStmt, toJIdentityStmt, toJInvokeStmt, toJNopStmt, toJRetStmt, toJReturnStmt, toJReturnVoidStmt, toJSwitchStmt, toJThrowStmt, withNewUse
-
Field Details
-
FALSE_BRANCH_IDX
public static final int FALSE_BRANCH_IDX- See Also:
-
TRUE_BRANCH_IDX
public static final int TRUE_BRANCH_IDX- See Also:
-
-
Constructor Details
-
JIfStmt
-
-
Method Details
-
toString
-
toString
-
isJIfStmt
public boolean isJIfStmt() -
asJIfStmt
-
toJIfStmt
-
getCondition
-
getTargetStmts
- Specified by:
getTargetStmtsin interfaceBranchingStmt
-
getExpectedSuccessorCount
public int getExpectedSuccessorCount()Description copied from class:AbstractStmtReturns the amount of unexceptional successors the Stmt needs to have in the StmtGraph.- Specified by:
getExpectedSuccessorCountin interfaceStmt- Overrides:
getExpectedSuccessorCountin classAbstractStmt
-
getUses
Description copied from class:AbstractStmtReturns a list of Values used in this Stmt. Note that they are returned in usual evaluation order.- Specified by:
getUsesin interfaceStmt- Overrides:
getUsesin classAbstractStmt
-
accept
Description copied from interface:AcceptorCalled when this object is visited.- Specified by:
acceptin interfaceAcceptor<StmtVisitor>
-
fallsThrough
public boolean fallsThrough()Description copied from interface:StmtReturns true if execution after this statement may continue at the following statement. (e.g. GotoStmt will return false and e.g. IfStmt will return true).- Specified by:
fallsThroughin interfaceFallsThroughStmt- Specified by:
fallsThroughin interfaceStmt
-
branches
public boolean branches()Description copied from interface:StmtReturns true if execution after this statement does not necessarily continue at the following statement. TheBranchingStmt's GotoStmt, JSwitchStmt and IfStmt will return true.- Specified by:
branchesin interfaceBranchingStmt- Specified by:
branchesin interfaceStmt
-
equivTo
Description copied from interface:EquivToReturns true if this object is equivalent to o according to the given comparator. -
equivHashCode
public int equivHashCode()Description copied from interface:EquivToReturns a (not necessarily fixed) hash code for this object. This hash code coincides with equivTo; it is undefined in the presence of mutable objects. The contract is defined inJimpleComparator.- Specified by:
equivHashCodein interfaceEquivTo
-
withCondition
-
withPositionInfo
-