1 46 package org.codehaus.groovy.ast.stmt; 47 48 import org.codehaus.groovy.ast.GroovyCodeVisitor; 49 import org.codehaus.groovy.ast.expr.Expression; 50 51 52 58 public class CaseStatement extends Statement { 59 60 private Statement code; 61 private Expression expression; 62 63 public CaseStatement(Expression expression, Statement code) { 64 this.expression = expression; 65 this.code = code; 66 } 67 68 public Statement getCode() { 69 return code; 70 } 71 72 public Expression getExpression() { 73 return expression; 74 } 75 76 public void visit(GroovyCodeVisitor visitor) { 77 visitor.visitCaseStatement(this); 78 } 79 80 public String toString() { 81 return super.toString() + "[expression: " + expression + "; code: " + code + "]"; 82 } 83 } 84 | Popular Tags |