Package sootup.core.jimple.common.stmt
Class JAssignStmt
java.lang.Object
sootup.core.jimple.common.stmt.AbstractStmt
sootup.core.jimple.common.stmt.AbstractDefinitionStmt
sootup.core.jimple.common.stmt.JAssignStmt
- All Implemented Interfaces:
EquivTo
,FallsThroughStmt
,InvokableStmt
,Stmt
,Acceptor<StmtVisitor>
public final class JAssignStmt
extends AbstractDefinitionStmt
implements FallsThroughStmt, InvokableStmt
Represents the assignment of one value to another
-
Field Summary
Fields inherited from class sootup.core.jimple.common.stmt.AbstractStmt
positionInfo
-
Constructor Summary
ConstructorDescriptionJAssignStmt
(LValue variable, Value rValue, StmtPositionInfo positionInfo) Instantiates a new JAssignStmt. -
Method Summary
Modifier and TypeMethodDescription<V extends StmtVisitor>
Vaccept
(V v) Called when this object is visited.boolean
branches()
Returns true if execution after this statement does not necessarily continue at the following statement.boolean
boolean
boolean
Checks if the invokable statement contains a invoke expression that defines the invoke.int
Returns a (not necessarily fixed) hash code for this object.boolean
equivTo
(Object o, JimpleComparator comparator) Returns true if this object is equivalent to o according to the given comparator.boolean
Returns true if execution after this statement may continue at the following statement.This method must only be used for Stmts which contain an ArrayRef - possible with JAssignStmts.This method must only be used for Stmts which contain an FieldRef - possible with JAssignStmts.Returns the possible invoke expression in the invokable statementboolean
Checks if the invokable statement can potentially invoke a static initializer To cause a static initializer call, the statement contains a static method call, a new expression, or a static field reference.toString()
void
toString
(StmtPrinter up) withNewDef
(Local newLocal) withPositionInfo
(StmtPositionInfo positionInfo) withRValue
(Value rValue) withVariable
(LValue variable) Methods inherited from class sootup.core.jimple.common.stmt.AbstractDefinitionStmt
getDef, getType, getUses
Methods inherited from class sootup.core.jimple.common.stmt.AbstractStmt
asInvokableStmt, getExpectedSuccessorCount, getPositionInfo, getUsesAndDefs, isInvokableStmt, withNewUse
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.stmt.Stmt
asInvokableStmt, getDef, getExpectedSuccessorCount, getPositionInfo, getUses, getUsesAndDefs, isInvokableStmt, withNewUse
-
Constructor Details
-
Method Details
-
containsInvokeExpr
public boolean containsInvokeExpr()Description copied from interface:InvokableStmt
Checks if the invokable statement contains a invoke expression that defines the invoke.- Specified by:
containsInvokeExpr
in interfaceInvokableStmt
- Returns:
- true if the statement contains an invoke expression, false if not
-
invokesStaticInitializer
public boolean invokesStaticInitializer()Description copied from interface:InvokableStmt
Checks if the invokable statement can potentially invoke a static initializer To cause a static initializer call, the statement contains a static method call, a new expression, or a static field reference.- Specified by:
invokesStaticInitializer
in interfaceInvokableStmt
- Returns:
- true if the statement can cause a static initializer call, and false if not.
-
getInvokeExpr
Description copied from interface:InvokableStmt
Returns the possible invoke expression in the invokable statement- Specified by:
getInvokeExpr
in interfaceInvokableStmt
- Returns:
- The optional contains the invoke expression of the invokable statement or is empty if there is no invoke expression.
-
containsArrayRef
public boolean containsArrayRef()- Specified by:
containsArrayRef
in interfaceStmt
- Overrides:
containsArrayRef
in classAbstractStmt
-
getArrayRef
Description copied from class:AbstractStmt
This method must only be used for Stmts which contain an ArrayRef - possible with JAssignStmts. check via containsArrayRef().- Specified by:
getArrayRef
in interfaceStmt
- Overrides:
getArrayRef
in classAbstractStmt
-
containsFieldRef
public boolean containsFieldRef()- Specified by:
containsFieldRef
in interfaceStmt
- Overrides:
containsFieldRef
in classAbstractStmt
-
getFieldRef
Description copied from class:AbstractStmt
This method must only be used for Stmts which contain an FieldRef - possible with JAssignStmts. check via containsFieldRef().- Specified by:
getFieldRef
in interfaceStmt
- Overrides:
getFieldRef
in classAbstractStmt
-
toString
-
toString
-
accept
Description copied from interface:Acceptor
Called when this object is visited.- Specified by:
accept
in interfaceAcceptor<StmtVisitor>
-
equivTo
Description copied from interface:EquivTo
Returns true if this object is equivalent to o according to the given comparator. -
equivHashCode
public int equivHashCode()Description copied from interface:EquivTo
Returns 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:
equivHashCode
in interfaceEquivTo
-
getLeftOp
- Specified by:
getLeftOp
in classAbstractDefinitionStmt
-
getRightOp
- Specified by:
getRightOp
in classAbstractDefinitionStmt
-
fallsThrough
public boolean fallsThrough()Description copied from interface:Stmt
Returns 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:
fallsThrough
in interfaceFallsThroughStmt
- Specified by:
fallsThrough
in interfaceStmt
- Overrides:
fallsThrough
in classAbstractDefinitionStmt
-
branches
public boolean branches()Description copied from interface:Stmt
Returns 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:
branches
in interfaceStmt
- Overrides:
branches
in classAbstractDefinitionStmt
-
withNewDef
- Specified by:
withNewDef
in classAbstractDefinitionStmt
-
withVariable
-
withRValue
-
withPositionInfo
-