Package sootup.core.jimple.common.stmt
Class AbstractDefinitionStmt
java.lang.Object
sootup.core.jimple.common.stmt.AbstractStmt
sootup.core.jimple.common.stmt.AbstractDefinitionStmt
- All Implemented Interfaces:
EquivTo,Stmt,Acceptor<StmtVisitor>
- Direct Known Subclasses:
JAssignStmt,JIdentityStmt
Abstract base class for definition statements (assignments).
-
Field Summary
Fields inherited from class sootup.core.jimple.common.stmt.AbstractStmt
positionInfo -
Method Summary
Modifier and TypeMethodDescriptionbooleanbranches()Returns true if execution after this statement does not necessarily continue at the following statement.final voidcollectUses(List<Value> collector) Collects all values used by this statement into the given list.booleanReturns true if execution after this statement may continue at the following statement.getDef()Returns a list of Values defined in this Stmt.abstract @NonNull LValueReturns the left-hand side (defined value) of this definition.abstract @NonNull ValueReturns the right-hand side (value being assigned) of this definition.@NonNull TypegetType()Returns the type of the defined value.abstract @NonNull FallsThroughStmtwithNewDef(@NonNull Local newLocal) Returns a copy of this statement with the defined local replaced by newLocal.Methods inherited from class sootup.core.jimple.common.stmt.AbstractStmt
asInvokableStmt, containsArrayRef, containsFieldRef, getArrayRef, getExpectedSuccessorCount, getFieldRef, getPositionInfo, isInvokableStmt, withNewUseMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface sootup.core.jimple.basic.EquivTo
equivHashCode, equivTo, equivToMethods inherited from interface sootup.core.jimple.common.stmt.Stmt
asJAssignStmt, asJBreakpointStmt, asJEnterMonitorStmt, asJExitMonitorStmt, asJGotoStmt, asJIdentityStmt, asJIfStmt, asJInvokeStmt, asJNopStmt, asJRetStmt, asJReturnStmt, asJReturnVoidStmt, asJSwitchStmt, asJThrowStmt, getUses, getUsesAndDefs, isJAssignStmt, isJBreakpointStmt, isJEnterMonitorStmt, isJExitMonitorStmt, isJGotoStmt, isJIdentityStmt, isJIfStmt, isJInvokeStmt, isJNopStmt, isJRetStmt, isJReturnStmt, isJReturnVoidStmt, isJSwitchStmt, isJThrowStmt, toJAssignStmt, toJBreakpointStmt, toJEnterMonitorStmt, toJExitMonitorStmt, toJGotoStmt, toJIdentityStmt, toJIfStmt, toJInvokeStmt, toJNopStmt, toJRetStmt, toJReturnStmt, toJReturnVoidStmt, toJSwitchStmt, toJThrowStmt, toString
-
Method Details
-
getLeftOp
Returns the left-hand side (defined value) of this definition. -
getRightOp
Returns the right-hand side (value being assigned) of this definition. -
getType
Returns the type of the defined value. -
getDef
Description copied from class:AbstractStmtReturns a list of Values defined in this Stmt. There are languages which allow multiple return types/assignments so we return a List- Specified by:
getDefin interfaceStmt- Overrides:
getDefin classAbstractStmt
-
collectUses
Description copied from interface:StmtCollects all values used by this statement into the given list.- Specified by:
collectUsesin interfaceStmt- Overrides:
collectUsesin classAbstractStmt
-
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).- Returns:
- true if control may fall through to the next statement
-
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.- Returns:
- true if this statement may branch to a non-sequential successor
-
withNewDef
Returns a copy of this statement with the defined local replaced by newLocal.
-