1 package net.sourceforge.phpdt.internal.compiler.ast;
4 import java.util.ArrayList;
7 * A GlobalStatement statement in php.
8 * @author Matthieu Casanova
10 public class StaticStatement extends Statement {
12 /** An array of the variables called by this global statement. */
13 public VariableDeclaration[] variables;
15 public StaticStatement(final VariableDeclaration[] variables, final int sourceStart, final int sourceEnd) {
16 super(sourceStart, sourceEnd);
17 this.variables = variables;
20 public String toString() {
21 final StringBuffer buff = new StringBuffer("static ");
22 for (int i = 0; i < variables.length; i++) {
26 buff.append(variables[i]);
28 return buff.toString();
31 public String toString(final int tab) {
32 return tabString(tab) + toString();
36 * Get the variables from outside (parameters, globals ...)
38 public void getOutsideVariable(final List list) {
39 for (int i = 0; i < variables.length; i++) {
40 variables[i].getModifiedVariable(list);
45 * get the modified variables.
47 public void getModifiedVariable(final List list) {
51 * Get the variables used.
53 public void getUsedVariable(final List list) {