Package org.codehaus.groovy.ast.stmt
Class SwitchStatement
java.lang.Object
org.codehaus.groovy.ast.ASTNode
org.codehaus.groovy.ast.stmt.Statement
org.codehaus.groovy.ast.stmt.SwitchStatement
- All Implemented Interfaces:
NodeMetaDataHandler
Represents a switch (object) { case value: ... case [1, 2, 3]: ... default: ... } statement in Groovy.
-
Constructor Summary
ConstructorDescriptionSwitchStatement
(Expression expression) SwitchStatement
(Expression expression, List<CaseStatement> caseStatements, Statement defaultStatement) SwitchStatement
(Expression expression, Statement defaultStatement) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCase
(CaseStatement caseStatement) getCaseStatement
(int idx) void
setDefaultStatement
(Statement defaultStatement) void
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
-
SwitchStatement
-
SwitchStatement
-
SwitchStatement
public SwitchStatement(Expression expression, List<CaseStatement> caseStatements, Statement defaultStatement)
-
-
Method Details