Class JInvokeStmt

java.lang.Object
sootup.core.jimple.common.stmt.AbstractStmt
sootup.core.jimple.common.stmt.JInvokeStmt
All Implemented Interfaces:
EquivTo, FallsThroughStmt, InvokableStmt, Stmt, Acceptor<StmtVisitor>

public final class JInvokeStmt extends AbstractStmt implements FallsThroughStmt, InvokableStmt
A method call
  • 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 interface InvokableStmt
      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 interface InvokableStmt
      Returns:
      true if the statement can cause a static initializer call, and false if not.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toString

      public void toString(@Nonnull StmtPrinter up)
      Specified by:
      toString in interface Stmt
    • getInvokeExpr

      @Nonnull public Optional<AbstractInvokeExpr> getInvokeExpr()
      Description copied from interface: InvokableStmt
      Returns the possible invoke expression in the invokable statement
      Specified by:
      getInvokeExpr in interface InvokableStmt
      Returns:
      The optional contains the invoke expression of the invokable statement or is empty if there is no invoke expression.
    • getUses

      @Nonnull public Stream<Value> getUses()
      Description copied from class: AbstractStmt
      Returns a list of Values used in this Stmt. Note that they are returned in usual evaluation order.
      Specified by:
      getUses in interface Stmt
      Overrides:
      getUses in class AbstractStmt
    • accept

      public <V extends StmtVisitor> V accept(@Nonnull V v)
      Description copied from interface: Acceptor
      Called when this object is visited.
      Specified by:
      accept in interface Acceptor<StmtVisitor>
    • 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 interface FallsThroughStmt
      Specified by:
      fallsThrough in interface Stmt
    • branches

      public boolean branches()
      Description copied from interface: Stmt
      Returns true if execution after this statement does not necessarily continue at the following statement. The BranchingStmt's GotoStmt, JSwitchStmt and IfStmt will return true.
      Specified by:
      branches in interface Stmt
    • equivTo

      public boolean equivTo(Object o, @Nonnull JimpleComparator comparator)
      Description copied from interface: EquivTo
      Returns true if this object is equivalent to o according to the given comparator.
      Specified by:
      equivTo in interface EquivTo
    • 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 in JimpleComparator.
      Specified by:
      equivHashCode in interface EquivTo
    • withInvokeExpr

      @Nonnull public JInvokeStmt withInvokeExpr(AbstractInvokeExpr invokeExpr)
    • withPositionInfo

      @Nonnull public JInvokeStmt withPositionInfo(@Nonnull StmtPositionInfo positionInfo)