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 / BinaryExpression.java
index 3455363..46643d1 100644 (file)
@@ -28,32 +28,24 @@ public class BinaryExpression extends OperatorExpression {
 
   /**
    * 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(left.getModifiedVariable());
-    list.addAll(right.getModifiedVariable());
-    return list;
+  public void getModifiedVariable(final List list) {
+    left.getModifiedVariable(list);
+    right.getModifiedVariable(list);
   }
 
   /**
    * Get the variables used.
-   * @return the variables used
    */
-  public List getUsedVariable() {
-    final ArrayList list = new ArrayList();
-    list.addAll(left.getUsedVariable());
-    list.addAll(right.getUsedVariable());
-    return list;
+  public void getUsedVariable(final List list) {
+    left.getUsedVariable(list);
+    right.getUsedVariable(list);
   }
 
 }