package net.sourceforge.phpdt.internal.compiler.ast;
+import net.sourceforge.phpdt.internal.compiler.ast.declarations.VariableUsage;
+
+import java.util.List;
+import java.util.ArrayList;
+
/**
* A GlobalStatement statement in php.
* @author Matthieu Casanova
/** An array of the variables called by this global statement. */
public String[] variables;
- public StaticStatement(String[] variables, int sourceStart, int sourceEnd) {
+ public StaticStatement(final String[] variables, final int sourceStart, final int sourceEnd) {
super(sourceStart, sourceEnd);
this.variables = variables;
}
public String toString() {
- StringBuffer buff = new StringBuffer("static ");
+ final StringBuffer buff = new StringBuffer("static ");
for (int i = 0; i < variables.length; i++) {
if (i != 0) {
buff.append(", ");
return buff.toString();
}
- public String toString(int tab) {
+ public String toString(final int tab) {
return tabString(tab) + toString();
}
+
+ /**
+ * Get the variables from outside (parameters, globals ...)
+ * @return the variables from outside
+ */
+ public List getOutsideVariable() {
+ final ArrayList list = new ArrayList(variables.length);
+ for (int i = 0; i < variables.length; i++) {
+ list.add(new VariableUsage(variables[i], sourceStart));
+ }
+ return list;
+ }
+
+ /**
+ * get the modified variables.
+ * @return the variables modified
+ */
+ public List getModifiedVariable() {
+ return new ArrayList();
+ }
+
+ /**
+ * Get the variables used.
+ * @return the variables used
+ */
+ public List getUsedVariable() {
+ return new ArrayList();
+ }
}