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 final 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   protected 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 ...).
 
  30    * @param list the list where we will put variables
 
  32   public final void getOutsideVariable(final List list) {
 
  33     for (int i = 0; i < statements.length; i++) {
 
  34       statements[i].getOutsideVariable(list);
 
  39    * get the modified variables.
 
  40    * @param list the list where we will put variables
 
  42   public void getModifiedVariable(final List list) {
 
  43     for (int i = 0; i < statements.length; i++) {
 
  44       statements[i].getModifiedVariable(list);
 
  49    * Get the variables used.
 
  50    * @param list the list where we will put variables
 
  52   public void getUsedVariable(final List list) {
 
  53     for (int i = 0; i < statements.length; i++) {
 
  54       statements[i].getUsedVariable(list);