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 ...)
37 * @return the variables from outside
39 public List getOutsideVariable() {
40 final ArrayList list = new ArrayList();
41 for (int i = 0; i < variables.length; i++) {
42 list.addAll(variables[i].getModifiedVariable());
48 * get the modified variables.
49 * @return the variables modified
51 public List getModifiedVariable() {
52 return new ArrayList(1);
56 * Get the variables used.
57 * @return the variables used
59 public List getUsedVariable() {
60 return new ArrayList(1);