1 package net.sourceforge.phpdt.internal.compiler.ast;
6 * Superclass of case statement that we can find in a switch.
7 * @author Matthieu Casanova
9 public abstract class AbstractCase extends Statement {
11 /** The statements in the case. */
12 public Statement[] statements;
15 * Create a case statement
16 * @param statements the statements array
17 * @param sourceStart the beginning source offset
18 * @param sourceEnd the ending offset
20 public AbstractCase(final Statement[] statements,
21 final int sourceStart,
22 final int sourceEnd) {
23 super(sourceStart, sourceEnd);
24 this.statements = statements;
29 * Get the variables from outside (parameters, globals ...)
31 public void getOutsideVariable(final List list) {
32 for (int i = 0; i < statements.length; i++) {
33 statements[i].getOutsideVariable(list);
38 * get the modified variables.
40 public void getModifiedVariable(final List list) {
41 for (int i = 0; i < statements.length; i++) {
42 statements[i].getModifiedVariable(list);
47 * Get the variables used.
49 public void getUsedVariable(final List list) {
50 for (int i = 0; i < statements.length; i++) {
51 statements[i].getUsedVariable(list);