1 package net.sourceforge.phpdt.internal.compiler.ast;
6 * @author Matthieu Casanova
8 public final class LabeledStatement extends Statement {
10 private final String label;
12 private final Statement statement;
14 public LabeledStatement(final String label,
15 final Statement statement,
16 final int sourceStart,
17 final int sourceEnd) {
18 super(sourceStart, sourceEnd);
20 this.statement = statement;
24 * Return the object into String.
25 * It should be overriden
29 public String toString() {
30 return label + statement.toString();
34 * Return the object into String.
36 * @param tab how many tabs (not used here
39 public String toString(final int tab) {
40 return tabString(tab) + toString();
44 * Get the variables from outside (parameters, globals ...)
46 * @param list the list where we will put variables
48 public void getOutsideVariable(final List list) {
49 statement.getOutsideVariable(list);
53 * get the modified variables.
55 * @param list the list where we will put variables
57 public void getModifiedVariable(final List list) {
58 statement.getModifiedVariable(list);
62 * Get the variables used.
64 * @param list the list where we will put variables
66 public void getUsedVariable(final List list) {
67 statement.getUsedVariable(list);