Class JThrowStmt

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

public final class JThrowStmt extends AbstractStmt
A statement that throws an Exception
  • Constructor Details

  • Method Details

    • toString

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

      public void toString(@NonNull StmtPrinter up)
    • isJThrowStmt

      public boolean isJThrowStmt()
    • asJThrowStmt

      public JThrowStmt asJThrowStmt()
    • toJThrowStmt

      public Optional<JThrowStmt> toJThrowStmt()
    • accept

      public <V extends StmtVisitor> V accept(@NonNull V v)
      Description copied from interface: Acceptor
      Called when this object is visited.
      Type Parameters:
      V - the concrete visitor type
      Parameters:
      v - the visitor processing this object
      Returns:
      the visitor after processing
    • 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).
      Returns:
      true if control may fall through to the next statement
    • 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.
      Returns:
      true if this statement may branch to a non-sequential successor
    • getExpectedSuccessorCount

      public int getExpectedSuccessorCount()
      Description copied from class: AbstractStmt
      Returns the amount of unexceptional successors the Stmt needs to have in the ControlFlowGraph.
      Specified by:
      getExpectedSuccessorCount in interface Stmt
      Overrides:
      getExpectedSuccessorCount in class AbstractStmt
    • equivTo

      public boolean equivTo(Object o, JimpleComparator comparator)
      Description copied from interface: EquivTo
      Returns true if this object is equivalent to o according to the given comparator.
      Parameters:
      o - the object to compare with
      comparator - the comparator defining the equivalence relation
      Returns:
      true if this object is structurally equivalent to o under the given comparator
    • withOp

      public @NonNull JThrowStmt withOp(@NonNull Immediate op)
    • withPositionInfo

      public @NonNull JThrowStmt withPositionInfo(@NonNull StmtPositionInfo positionInfo)
    • getOp

      public @NonNull Immediate getOp()
    • collectUses

      public void collectUses(List<Value> collector)
      Description copied from interface: Stmt
      Collects all values used by this statement into the given list.
      Specified by:
      collectUses in interface Stmt
      Overrides:
      collectUses in class AbstractStmt
    • 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.
      Returns:
      a structural hash code consistent with equivTo