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
- All Implemented Interfaces:
NodeMetaDataHandler
Represents a try { ... } catch () finally {} statement in Groovy
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addCatch
(CatchStatement catchStatement) void
addResource
(ExpressionStatement resourceStatement) getCatchStatement
(int idx) getResourceStatement
(int idx) static boolean
isResource
(Expression expression) 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, copyStatementLabels, getStatementLabel, getStatementLabels, isEmpty, setStatementLabel
Methods inherited from class org.codehaus.groovy.ast.ASTNode
copyNodeMetaData, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getMetaDataMap, getText, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setMetaDataMap, setSourcePosition
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.codehaus.groovy.ast.NodeMetaDataHandler
copyNodeMetaData, getNodeMetaData, getNodeMetaData, getNodeMetaData, putNodeMetaData, removeNodeMetaData, setNodeMetaData
-
Constructor Details
-
TryCatchStatement
-
-
Method Details
-
visit
-
getResourceStatements
-
getCatchStatements
-
getFinallyStatement
-
getTryStatement
-
addResource
-
isResource
-
addCatch
-
getCatchStatement
- Returns:
- the catch statement of the given index or null
-
getResourceStatement
- Returns:
- the resource statement of the given index or null
-
setTryStatement
-
setCatchStatement
-
setFinallyStatement
-