Package soot.JastAddJ

Class TryStmt

    • Field Detail

      • branches_computed

        protected boolean branches_computed
      • branches_value

        protected Collection branches_value
      • branchesFromFinally_computed

        protected boolean branchesFromFinally_computed
      • branchesFromFinally_value

        protected Collection branchesFromFinally_value
      • targetBranches_computed

        protected boolean targetBranches_computed
      • targetBranches_value

        protected Collection targetBranches_value
      • escapedBranches_computed

        protected boolean escapedBranches_computed
      • escapedBranches_value

        protected Collection escapedBranches_value
      • isDAafter_Variable_values

        protected Map isDAafter_Variable_values
      • isDUbefore_Variable_values

        protected Map isDUbefore_Variable_values
      • isDUafter_Variable_values

        protected Map isDUafter_Variable_values
      • catchableException_TypeDecl_values

        protected Map catchableException_TypeDecl_values
      • canCompleteNormally_computed

        protected boolean canCompleteNormally_computed
      • canCompleteNormally_value

        protected boolean canCompleteNormally_value
      • label_begin_computed

        protected boolean label_begin_computed
      • label_begin_value

        protected Stmt label_begin_value
      • label_block_end_computed

        protected boolean label_block_end_computed
      • label_block_end_value

        protected Stmt label_block_end_value
      • label_end_computed

        protected boolean label_end_computed
      • label_end_value

        protected Stmt label_end_value
      • label_finally_computed

        protected boolean label_finally_computed
      • label_finally_value

        protected Stmt label_finally_value
      • label_finally_block_computed

        protected boolean label_finally_block_computed
      • label_finally_block_value

        protected Stmt label_finally_block_value
      • label_exception_handler_computed

        protected boolean label_exception_handler_computed
      • label_exception_handler_value

        protected Stmt label_exception_handler_value
      • label_catch_end_computed

        protected boolean label_catch_end_computed
      • label_catch_end_value

        protected Stmt label_catch_end_value
      • exceptionRanges_computed

        protected boolean exceptionRanges_computed
      • exceptionRanges_value

        protected ArrayList exceptionRanges_value
      • handlesException_TypeDecl_values

        protected Map handlesException_TypeDecl_values
      • typeError_computed

        protected boolean typeError_computed
      • typeError_value

        protected TypeDecl typeError_value
      • typeRuntimeException_computed

        protected boolean typeRuntimeException_computed
      • typeRuntimeException_value

        protected TypeDecl typeRuntimeException_value
    • Method Detail

      • flushCache

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

        public TryStmt 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
      • addFallThroughLabelTag

        protected void addFallThroughLabelTag​(Body b,
                                              Stmt handler,
                                              Stmt fallThrough)
      • emitExceptionHandler

        public void emitExceptionHandler​(Body b)
      • 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
      • setBlock

        public void setBlock​(Block node)
        Replaces the Block child.
        Parameters:
        node - The new node to replace the Block child.
      • getBlock

        public Block getBlock()
        Retrieves the Block child.
        Returns:
        The current node used as the Block child.
      • getBlockNoTransform

        public Block getBlockNoTransform()
        Retrieves the Block child.

        This method does not invoke AST transformations.

        Returns:
        The current node used as the Block child.
      • setCatchClauseList

        public void setCatchClauseList​(List<CatchClause> list)
        Replaces the CatchClause list.
        Parameters:
        list - The new list node to be used as the CatchClause list.
      • getNumCatchClause

        public int getNumCatchClause()
        Retrieves the number of children in the CatchClause list.
        Returns:
        Number of children in the CatchClause list.
      • getNumCatchClauseNoTransform

        public int getNumCatchClauseNoTransform()
        Retrieves the number of children in the CatchClause list. Calling this method will not trigger rewrites..
        Returns:
        Number of children in the CatchClause list.
      • getCatchClause

        public CatchClause getCatchClause​(int i)
        Retrieves the element at index i in the CatchClause list..
        Parameters:
        i - Index of the element to return.
        Returns:
        The element at position i in the CatchClause list.
      • addCatchClause

        public void addCatchClause​(CatchClause node)
        Append an element to the CatchClause list.
        Parameters:
        node - The element to append to the CatchClause list.
      • addCatchClauseNoTransform

        public void addCatchClauseNoTransform​(CatchClause node)
      • setCatchClause

        public void setCatchClause​(CatchClause node,
                                   int i)
        Replaces the CatchClause list element at index i with the new node node.
        Parameters:
        node - The new node to replace the old list element.
        i - The list index of the node to be replaced.
      • getCatchClauses

        public List<CatchClause> getCatchClauses()
        Retrieves the CatchClause list.
        Returns:
        The node representing the CatchClause list.
      • getCatchClausesNoTransform

        public List<CatchClause> getCatchClausesNoTransform()
        Retrieves the CatchClause list.

        This method does not invoke AST transformations.

        Returns:
        The node representing the CatchClause list.
      • getCatchClauseList

        public List<CatchClause> getCatchClauseList()
        Retrieves the CatchClause list.
        Returns:
        The node representing the CatchClause list.
      • getCatchClauseListNoTransform

        public List<CatchClause> getCatchClauseListNoTransform()
        Retrieves the CatchClause list.

        This method does not invoke AST transformations.

        Returns:
        The node representing the CatchClause list.
      • setFinallyOpt

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

        public boolean hasFinally()
        Check whether the optional Finally child exists.
        Returns:
        true if the optional Finally child exists, false if it does not.
      • getFinally

        public Block getFinally()
        Retrieves the (optional) Finally child.
        Returns:
        The Finally child, if it exists. Returns null otherwise.
      • setFinally

        public void setFinally​(Block node)
        Replaces the (optional) Finally child.
        Parameters:
        node - The new node to be used as the Finally child.
      • getFinallyOpt

        public Opt<Block> getFinallyOpt()
      • getFinallyOptNoTransform

        public Opt<Block> getFinallyOptNoTransform()
        Retrieves the optional node for child Finally. This is the Opt node containing the child Finally, not the actual child!

        This method does not invoke AST transformations.

        Returns:
        The optional node for child Finally.
      • branchesFromFinally

        public Collection branchesFromFinally()
      • targetBranches

        public Collection targetBranches()
      • escapedBranches

        public Collection escapedBranches()
      • catchableException

        public boolean catchableException​(TypeDecl type)
        The block of the try statement can throw an exception of a type assignable to the given type.
      • label_begin

        public Stmt label_begin()
      • label_block_end

        public Stmt label_block_end()
      • label_end

        public Stmt label_end()
      • label_finally

        public Stmt label_finally()
      • label_exception_handler

        public Stmt label_exception_handler()
      • label_catch_end

        public Stmt label_catch_end()
      • needsFinallyTrap

        public boolean needsFinallyTrap()
      • exceptionRanges

        public ArrayList exceptionRanges()
      • handlesException

        public boolean handlesException​(TypeDecl exceptionType)
      • typeError

        public TypeDecl typeError()
      • typeRuntimeException

        public TypeDecl typeRuntimeException()
      • enclosedByExceptionHandler

        public boolean enclosedByExceptionHandler()
      • typeThrowable

        public TypeDecl typeThrowable()