The methods to get variables do not instantiate ArrayList each time, only one is...
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / compiler / ast / ArrayVariableDeclaration.java
index 4322f61..4a306e6 100644 (file)
@@ -54,34 +54,27 @@ public class ArrayVariableDeclaration extends Expression {
 
   /**
    * Get the variables from outside (parameters, globals ...)
-   * @return the variables from outside
    */
-  public List getOutsideVariable() {
-    return new ArrayList();
+  public void getOutsideVariable(final List list) {
   }
 
   /**
    * get the modified variables.
-   * @return the variables from we change value
    */
-  public List getModifiedVariable() {
-    final ArrayList list = new ArrayList();
-    list.addAll(key.getModifiedVariable());
+  public void getModifiedVariable(final List list) {
+    key.getModifiedVariable(list);
     if (value != null) {
-      list.addAll(value.getModifiedVariable());
+      value.getModifiedVariable(list);
     }
-    return list;
   }
 
   /**
    * Get the variables used.
-   * @return the variables used
    */
-  public List getUsedVariable() {
-    final ArrayList list = new ArrayList();
+  public void getUsedVariable(final List list) {
+    key.getUsedVariable(list);
     if (value != null) {
-      list.addAll(value.getUsedVariable());
+      value.getUsedVariable(list);
     }
-    return list;
   }
 }