1 package net.sourceforge.phpdt.internal.compiler.ast;
6 * A GlobalStatement statement in php.
7 * @author Matthieu Casanova
9 public final class StaticStatement extends Statement {
11 /** An array of the variables called by this global statement. */
12 private final VariableDeclaration[] variables;
14 public StaticStatement(final VariableDeclaration[] variables, final int sourceStart, final int sourceEnd) {
15 super(sourceStart, sourceEnd);
16 this.variables = variables;
19 public String toString() {
20 final StringBuffer buff = new StringBuffer("static ");
21 for (int i = 0; i < variables.length; i++) {
25 buff.append(variables[i]);
27 return buff.toString();
30 public String toString(final int tab) {
31 return tabString(tab) + toString();
35 * Get the variables from outside (parameters, globals ...)
37 * @param list the list where we will put variables
39 public void getOutsideVariable(final List list) {
40 for (int i = 0; i < variables.length; i++) {
41 variables[i].getModifiedVariable(list);
46 * get the modified variables.
48 * @param list the list where we will put variables
50 public void getModifiedVariable(final List list) {
54 * Get the variables used.
56 * @param list the list where we will put variables
58 public void getUsedVariable(final List list) {