accrue.analysis.visit

## Class FindFinallyBlocks

- java.lang.Object
- - polyglot.visit.NodeVisitor
  - - polyglot.visit.HaltingVisitor
    - - polyglot.visit.ErrorHandlingVisitor
      - - accrue.analysis.visit.FindFinallyBlocks

- All Implemented Interfaces:
    java.lang.Cloneable, polyglot.util.Copy<polyglot.visit.NodeVisitor>

      public class FindFinallyBlocks
      extends polyglot.visit.ErrorHandlingVisitor

  This visitor identifies finally blocks, and records for every node how many finally blocks it is lexically nested in. This information is subsequently used in dataflow analyses, where it is important to handle the "suspended execution contexts" correctly (i.e., when flow enters a finally block it is necessary to maintain a stack of return results based on how flow reached the finally block).

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface polyglot.util.Copy

      `polyglot.util.Copy.Util`

  - ### Field Summary

    - ### Fields inherited from class polyglot.visit.ErrorHandlingVisitor

      `error, job, nf, ts`

    - ### Fields inherited from class polyglot.visit.HaltingVisitor

      `bypass, bypassParent`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FindFinallyBlocks(polyglot.frontend.Job job, polyglot.types.TypeSystem ts, polyglot.ast.NodeFactory nf)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected polyglot.visit.NodeVisitor` | `enterCall(polyglot.ast.Node parent, polyglot.ast.Node n)`
    `polyglot.ast.Node` | `leaveCall(polyglot.ast.Node parent, polyglot.ast.Node old, polyglot.ast.Node n, polyglot.visit.NodeVisitor v)`

    - ### Methods inherited from class polyglot.visit.ErrorHandlingVisitor

      `begin, catchErrors, enter, enterCall, enterError, errorQueue, hasErrors, job, leave, leaveCall, leaveCall, nodeFactory, typeSystem`

    - ### Methods inherited from class polyglot.visit.HaltingVisitor

      `bypass, bypass, bypassChildren, override, visitChildren`

    - ### Methods inherited from class polyglot.visit.NodeVisitor

      `copy, enter, finish, finish, lang, leave, override, toString, visitEdge, visitEdgeNoOverride`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### FindFinallyBlocks

          public FindFinallyBlocks(polyglot.frontend.Job job,
                           polyglot.types.TypeSystem ts,
                           polyglot.ast.NodeFactory nf)

  - ### Method Detail

    - #### enterCall

          protected polyglot.visit.NodeVisitor enterCall(polyglot.ast.Node parent,
                                             polyglot.ast.Node n)
                                                  throws polyglot.types.SemanticException

      Overrides:
        `enterCall` in class `polyglot.visit.ErrorHandlingVisitor`
      Throws:
        `polyglot.types.SemanticException`

    - #### leaveCall

          public polyglot.ast.Node leaveCall(polyglot.ast.Node parent,
                                    polyglot.ast.Node old,
                                    polyglot.ast.Node n,
                                    polyglot.visit.NodeVisitor v)
                                      throws polyglot.types.SemanticException

      Overrides:
        `leaveCall` in class `polyglot.visit.ErrorHandlingVisitor`
      Throws:
        `polyglot.types.SemanticException`