1 package net.sourceforge.phpdt.internal.compiler.ast;
3 import net.sourceforge.phpdt.internal.compiler.ast.declarations.VariableUsage;
6 import java.util.ArrayList;
9 * A GlobalStatement statement in php.
10 * @author Matthieu Casanova
12 public class StaticStatement extends Statement {
14 /** An array of the variables called by this global statement. */
15 public String[] variables;
17 public StaticStatement(final String[] variables, final int sourceStart, final int sourceEnd) {
18 super(sourceStart, sourceEnd);
19 this.variables = variables;
22 public String toString() {
23 final StringBuffer buff = new StringBuffer("static ");
24 for (int i = 0; i < variables.length; i++) {
28 buff.append(variables[i]);
30 return buff.toString();
33 public String toString(final int tab) {
34 return tabString(tab) + toString();
38 * Get the variables from outside (parameters, globals ...)
39 * @return the variables from outside
41 public List getOutsideVariable() {
42 final ArrayList list = new ArrayList(variables.length);
43 for (int i = 0; i < variables.length; i++) {
44 list.add(new VariableUsage(variables[i], sourceStart));
50 * get the modified variables.
51 * @return the variables modified
53 public List getModifiedVariable() {
54 return new ArrayList();
58 * Get the variables used.
59 * @return the variables used
61 public List getUsedVariable() {
62 return new ArrayList();