Changes:
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / compiler / ast / ForStatement.java
index 689a737..9ee27d5 100644 (file)
@@ -1,7 +1,6 @@
 package net.sourceforge.phpdt.internal.compiler.ast;
 
 import java.util.List;
-import java.util.ArrayList;
 
 /**
  * A For statement.
@@ -79,76 +78,67 @@ public class ForStatement extends Statement {
 
   /**
    * Get the variables from outside (parameters, globals ...)
-   * @return the variables from outside
    */
-  public List getOutsideVariable() {
-    final ArrayList list = new ArrayList();
+  public void getOutsideVariable(final List list) {
     if (condition != null) {
-      list.addAll(condition.getOutsideVariable());
+      condition.getOutsideVariable(list);
     }
     if (action != null) {
-      list.addAll(action.getOutsideVariable());
+      action.getOutsideVariable(list);
     }
     if (initializations != null) {
       for (int i = 0; i < initializations.length; i++) {
-        list.addAll(initializations[i].getOutsideVariable());
+        initializations[i].getOutsideVariable(list);
       }
     }
     if (increments != null) {
       for (int i = 0; i < increments.length; i++) {
-        list.addAll(increments[i].getOutsideVariable());
+        increments[i].getOutsideVariable(list);
       }
     }
-    return list;
   }
 
   /**
    * get the modified variables.
-   * @return the variables from we change value
    */
-  public List getModifiedVariable() {
-    final ArrayList list = new ArrayList();
+  public void getModifiedVariable(final List list) {
     if (condition != null) {
-      list.addAll(condition.getModifiedVariable());
+      condition.getModifiedVariable(list);
     }
     if (action != null) {
-      list.addAll(action.getModifiedVariable());
+      action.getModifiedVariable(list);
     }
     if (initializations != null) {
       for (int i = 0; i < initializations.length; i++) {
-        list.addAll(initializations[i].getModifiedVariable());
+        initializations[i].getModifiedVariable(list);
       }
     }
     if (increments != null) {
       for (int i = 0; i < increments.length; i++) {
-        list.addAll(increments[i].getModifiedVariable());
+        increments[i].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) {
     if (condition != null) {
-      list.addAll(condition.getUsedVariable());
+      condition.getUsedVariable(list);
     }
     if (action != null) {
-      list.addAll(action.getUsedVariable());
+      action.getUsedVariable(list);
     }
     if (initializations != null) {
       for (int i = 0; i < initializations.length; i++) {
-        list.addAll(initializations[i].getUsedVariable());
+        initializations[i].getUsedVariable(list);
       }
     }
     if (increments != null) {
       for (int i = 0; i < increments.length; i++) {
-        list.addAll(increments[i].getUsedVariable());
+        increments[i].getUsedVariable(list);
       }
     }
-    return list;
   }
 }