Overview | Package | Class
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.groovy.ast.stmt
Class SwitchStatement

Field Summary
`List` | `caseStatements`
`Statement` | `defaultStatement`
`Expression` | `expression`

Constructor Summary
`SwitchStatement(Expression expression)`
`SwitchStatement(Expression expression, Statement defaultStatement)`
`SwitchStatement(Expression expression, List caseStatements, Statement defaultStatement)`

Method Summary
`void` | `addCase(CaseStatement caseStatement)`
`CaseStatement` | `getCaseStatement(int idx)`
`List` | `getCaseStatements()`
`Statement` | `getDefaultStatement()`
`Expression` | `getExpression()`
`void` | `setDefaultStatement(Statement defaultStatement)`
`void` | `setExpression(Expression e)`
`void` | `visit(GroovyCodeVisitor visitor)`

Constructor Detail

### SwitchStatement

    public SwitchStatement(Expression expression)

### SwitchStatement

    public SwitchStatement(Expression expression, Statement defaultStatement)

### SwitchStatement

    public SwitchStatement(Expression expression, List caseStatements, Statement defaultStatement)

Method Detail

### addCase

    public void addCase(CaseStatement caseStatement)

### getCaseStatement

    public CaseStatement getCaseStatement(int idx)

  return:
    the case statement of the given index or null

### getCaseStatements

    public List getCaseStatements()

### getDefaultStatement

    public Statement getDefaultStatement()

### getExpression

    public Expression getExpression()

### setDefaultStatement

    public void setDefaultStatement(Statement defaultStatement)

### setExpression

    public void setExpression(Expression e)

### visit

    public void visit(GroovyCodeVisitor visitor)