TryCatchStatement (Groovy 2.4.10)
Date: 2017-03-14

org.codehaus.groovy.ast.stmt

## Class TryCatchStatement

- java.lang.Object
- - org.codehaus.groovy.ast.ASTNode
  - - org.codehaus.groovy.ast.stmt.Statement
    - - org.codehaus.groovy.ast.stmt.TryCatchStatement

-     public class TryCatchStatement
      extends Statement

  Represents a try { ... } catch () finally {} statement in Groovy
  Author:
    James Strachan

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TryCatchStatement(Statement tryStatement, Statement finallyStatement)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addCatch(CatchStatement catchStatement)`
    `CatchStatement` | `getCatchStatement(int idx)`
    `List<CatchStatement>` | `getCatchStatements()`
    `Statement` | `getFinallyStatement()`
    `Statement` | `getTryStatement()`
    `void` | `setCatchStatement(int idx, CatchStatement catchStatement)`
    `void` | `setFinallyStatement(Statement finallyStatement)`
    `void` | `setTryStatement(Statement tryStatement)`
    `void` | `visit(GroovyCodeVisitor visitor)`

    - ### Methods inherited from class org.codehaus.groovy.ast.stmt.Statement

      `addStatementLabel, getStatementLabel, getStatementLabels, isEmpty, setStatementLabel`

    - ### Methods inherited from class org.codehaus.groovy.ast.ASTNode

      `copyNodeMetaData, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getNodeMetaData, getNodeMetaData, getText, putNodeMetaData, removeNodeMetaData, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setNodeMetaData, setSourcePosition`

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

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

- - ### Constructor Detail

    - #### TryCatchStatement

          public TryCatchStatement(Statement tryStatement,
                                   Statement finallyStatement)

  - ### Method Detail

    - #### visit

          public void visit(GroovyCodeVisitor visitor)

      Overrides:
        `visit` in class `ASTNode`

    - #### getCatchStatements

          public List<CatchStatement> getCatchStatements()

    - #### getFinallyStatement

          public Statement getFinallyStatement()

    - #### getTryStatement

          public Statement getTryStatement()

    - #### addCatch

          public void addCatch(CatchStatement catchStatement)

    - #### getCatchStatement

          public CatchStatement getCatchStatement(int idx)

      Returns:
        the catch statement of the given index or null

    - #### setTryStatement

          public void setTryStatement(Statement tryStatement)

    - #### setCatchStatement

          public void setCatchStatement(int idx,
                                        CatchStatement catchStatement)

    - #### setFinallyStatement

          public void setFinallyStatement(Statement finallyStatement)