1 package net.sourceforge.phpdt.internal.compiler.ast;
3 import net.sourceforge.phpdt.internal.compiler.ast.declarations.VariableUsage;
6 import java.util.ArrayList;
9 * @author Matthieu Casanova
11 public class Variable extends Expression {
13 /** The name of the variable. */
17 public Variable(final char[] name, final int sourceStart, final int sourceEnd) {
18 super(sourceStart, sourceEnd);
23 * Return the expression as String.
24 * @return the expression
26 public String toStringExpression() {
27 return "$"+new String(name);
30 public String getName() {
31 return new String(name);
35 * Get the variables from outside (parameters, globals ...)
36 * @return the variables from outside
38 public List getOutsideVariable() {
39 return new ArrayList(1);
43 * get the modified variables.
44 * @return the variables modified
46 public List getModifiedVariable() {
47 final ArrayList list = new ArrayList(1);
48 list.add(new VariableUsage(getName(),sourceStart));
53 * Get the variables used.
54 * @return the variables used
56 public List getUsedVariable() {
57 return new ArrayList(1);