Package soot.JastAddJ

Class IfStmt

    • Field Detail

      • isDAafter_Variable_values

        protected Map isDAafter_Variable_values
      • isDUafter_Variable_values

        protected Map isDUafter_Variable_values
      • canCompleteNormally_computed

        protected boolean canCompleteNormally_computed
      • canCompleteNormally_value

        protected boolean canCompleteNormally_value
      • else_branch_label_computed

        protected boolean else_branch_label_computed
      • else_branch_label_value

        protected Stmt else_branch_label_value
      • then_branch_label_computed

        protected boolean then_branch_label_computed
      • then_branch_label_value

        protected Stmt then_branch_label_value
    • Constructor Detail

      • IfStmt

        public IfStmt​(Expr cond,
                      Stmt thenBranch)
      • IfStmt

        public IfStmt​(Expr cond,
                      Stmt thenBranch,
                      Stmt elseBranch)
      • IfStmt

        public IfStmt()
    • Method Detail

      • flushCache

        public void flushCache()
        Overrides:
        flushCache in class Stmt
      • fullCopy

        public IfStmt fullCopy()
        Create a deep copy of the AST subtree at this node. The copy is dangling, i.e. has no parent.
        Overrides:
        fullCopy in class ASTNode<ASTNode>
        Returns:
        dangling copy of the subtree at this node
      • init$Children

        public void init$Children()
        Initializes the child array to the correct size. Initializes List and Opt nta children.
        Overrides:
        init$Children in class Stmt
      • numChildren

        protected int numChildren()
        Overrides:
        numChildren in class Stmt
      • mayHaveRewrite

        public boolean mayHaveRewrite()
        Overrides:
        mayHaveRewrite in class Stmt
      • setCondition

        public void setCondition​(Expr node)
        Replaces the Condition child.
        Parameters:
        node - The new node to replace the Condition child.
      • getCondition

        public Expr getCondition()
        Retrieves the Condition child.
        Returns:
        The current node used as the Condition child.
      • getConditionNoTransform

        public Expr getConditionNoTransform()
        Retrieves the Condition child.

        This method does not invoke AST transformations.

        Returns:
        The current node used as the Condition child.
      • setThen

        public void setThen​(Stmt node)
        Replaces the Then child.
        Parameters:
        node - The new node to replace the Then child.
      • getThen

        public Stmt getThen()
        Retrieves the Then child.
        Returns:
        The current node used as the Then child.
      • getThenNoTransform

        public Stmt getThenNoTransform()
        Retrieves the Then child.

        This method does not invoke AST transformations.

        Returns:
        The current node used as the Then child.
      • setElseOpt

        public void setElseOpt​(Opt<Stmt> opt)
        Replaces the optional node for the Else child. This is the Opt node containing the child Else, not the actual child!
        Parameters:
        opt - The new node to be used as the optional node for the Else child.
      • hasElse

        public boolean hasElse()
        Check whether the optional Else child exists.
        Returns:
        true if the optional Else child exists, false if it does not.
      • getElse

        public Stmt getElse()
        Retrieves the (optional) Else child.
        Returns:
        The Else child, if it exists. Returns null otherwise.
      • setElse

        public void setElse​(Stmt node)
        Replaces the (optional) Else child.
        Parameters:
        node - The new node to be used as the Else child.
      • getElseOpt

        public Opt<Stmt> getElseOpt()
      • getElseOptNoTransform

        public Opt<Stmt> getElseOptNoTransform()
        Retrieves the optional node for child Else. This is the Opt node containing the child Else, not the actual child!

        This method does not invoke AST transformations.

        Returns:
        The optional node for child Else.
      • else_branch_label

        public Stmt else_branch_label()
      • then_branch_label

        public Stmt then_branch_label()