CaseStatement (Groovy 5.0.6)
Description: declaration: package: org.codehaus.groovy.ast.stmt, class: CaseStatement

Package org.codehaus.groovy.ast.stmt

# Class CaseStatement

java.lang.Object
org.codehaus.groovy.ast.ASTNode
org.codehaus.groovy.ast.stmt.Statement
org.codehaus.groovy.ast.stmt.CaseStatement

All Implemented Interfaces:
  `NodeMetaDataHandler`

public class CaseStatement extends Statement
Represents a case statement in a switch statement

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CaseStatement(Expression expression, Statement code)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Statement`
  `getCode()`
  `Expression`
  `getExpression()`
  `void`
  `setCode(Statement code)`
  `void`
  `setExpression(Expression e)`
  `String`
  `toString()`
  `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, wait, wait, wait`

  ### Methods inherited from interface org.codehaus.groovy.ast.NodeMetaDataHandler

  `copyNodeMetaData, getNodeMetaData, getNodeMetaData, getNodeMetaData, newMetaDataMap, putNodeMetaData, removeNodeMetaData, setNodeMetaData`

- ## Constructor Details

  - ### CaseStatement

    public CaseStatement(Expression expression, Statement code)

- ## Method Details

  - ### getCode

    public Statement getCode()

  - ### setCode

    public void setCode(Statement code)

  - ### getExpression

    public Expression getExpression()

  - ### setExpression

    public void setExpression(Expression e)

  - ### visit

    public void visit(GroovyCodeVisitor visitor)
    Overrides:
      `visit` in class `ASTNode`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`