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 / VarAssignation.java
index 5fb5cd3..17879e5 100644 (file)
@@ -103,32 +103,24 @@ public class VarAssignation 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(variableName.getUsedVariable());
-    list.addAll(initializer.getModifiedVariable());
-    return list;
+  public void getModifiedVariable(final List list) {
+    variableName.getUsedVariable(list);
+    initializer.getModifiedVariable(list);
   }
 
   /**
    * Get the variables used.
-   * @return the variables used
    */
-  public List getUsedVariable() {
-    final ArrayList list = new ArrayList();
-    list.addAll(initializer.getUsedVariable());
-    return list;
+  public void getUsedVariable(final List list) {
+    initializer.getUsedVariable(list);
   }
 }