Package 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
-
-
Constructor Summary
Constructors Constructor Description TryCatchStatement(Statement tryStatement, Statement finallyStatement)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addCatch(CatchStatement catchStatement)
CatchStatement
getCatchStatement(int idx)
java.util.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, getMetaDataMap, getNodeMetaData, getNodeMetaData, getText, putNodeMetaData, removeNodeMetaData, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setNodeMetaData, setSourcePosition
-
-
-
-
Method Detail
-
visit
public void visit(GroovyCodeVisitor visitor)
-
getCatchStatements
public java.util.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)
-
-