1 package net.sourceforge.phpdt.internal.compiler.ast;
4 import java.util.ArrayList;
7 * This variable declaration do not extend AbstractVariableDeclaration because
8 * it could take Expression as key.
9 * @author Matthieu Casanova
11 public class ArrayVariableDeclaration extends Expression {
13 public Expression key,value;
15 public ArrayVariableDeclaration(final Expression key,final Expression value) {
16 super(key.sourceStart, value.sourceEnd);
21 public ArrayVariableDeclaration(final Expression key,final int sourceEnd) {
22 super(key.sourceStart, sourceEnd);
26 * Return the expression as String.
27 * @return the expression
29 public String toStringExpression() {
30 final StringBuffer buff = new StringBuffer();
31 buff.append(key.toStringExpression());
34 buff.append(value.toStringExpression());
36 return buff.toString();
42 * Get the variables from outside (parameters, globals ...)
43 * @return the variables from outside
45 public List getOutsideVariable() {
46 return new ArrayList();
50 * get the modified variables.
51 * @return the variables from we change value
53 public List getModifiedVariable() {
54 final ArrayList list = new ArrayList();
55 list.addAll(key.getModifiedVariable());
56 list.addAll(value.getModifiedVariable());
61 * Get the variables used.
62 * @return the variables used
64 public List getUsedVariable() {
65 final ArrayList list = new ArrayList();
66 list.addAll(value.getUsedVariable());