*** empty log message ***
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / compiler / ast / LabeledStatement.java
1 package net.sourceforge.phpdt.internal.compiler.ast;
2
3 import java.util.List;
4
5 /**
6  * @author Matthieu Casanova
7  */
8 public class LabeledStatement extends Statement {
9
10   public char[] label;
11
12   public Statement statement;
13
14   public LabeledStatement(final char[] label, final Statement statement, final int sourceStart, final int sourceEnd) {
15     super(sourceStart, sourceEnd);
16     this.label = label;
17     this.statement = statement;
18   }
19
20   /**
21    * Return the object into String.
22    * It should be overriden
23    * @return a String
24    */
25   public String toString() {
26     return new String(label) + statement.toString();
27   }
28
29   /**
30    * Return the object into String.
31    * @param tab how many tabs (not used here
32    * @return a String
33    */
34   public String toString(final int tab) {
35     return tabString(tab) + toString();
36   }
37
38     /**
39    * Get the variables from outside (parameters, globals ...)
40    * @return the variables from outside
41    */
42   public List getOutsideVariable() {
43     return statement.getOutsideVariable();
44   }
45
46   /**
47    * get the modified variables.
48    * @return the variables modified
49    */
50   public List getModifiedVariable() {
51     return statement.getModifiedVariable();
52   }
53
54   /**
55    * Get the variables used.
56    * @return the variables used
57    */
58   public List getUsedVariable() {
59     return statement.getUsedVariable();
60   }
61 }