1 package net.sourceforge.phpdt.internal.compiler.ast;
4 * A Case statement for a Switch.
5 * @author Matthieu Casanova
7 public class Case extends AbstractCase {
9 public Expression value;
10 public Statement[] statements;
12 public Case(Expression value,
13 Statement[] statements,
16 super(statements, sourceStart, sourceEnd);
21 * Return the object into String.
22 * @param tab how many tabs (not used here
25 public String toString(int tab) {
26 final StringBuffer buff = new StringBuffer(tabString(tab));
28 buff.append(value.toStringExpression());
30 if (statements != null) {
31 for (int i = 0; i < statements.length; i++) {
32 Statement statement = statements[i];
33 buff.append(statement.toString(tab + 1));
36 return buff.toString();