misc
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / compiler / ast / BranchStatement.java
index 2c164c4..3013a50 100644 (file)
@@ -1,51 +1,51 @@
 package net.sourceforge.phpdt.internal.compiler.ast;
 
 import java.util.List;
-import java.util.ArrayList;
 
 /**
- * Here is a branchstatement : break or continue
+ * Here is a branchstatement : break or continue.
  * @author Matthieu Casanova
  */
 public abstract class BranchStatement extends Statement {
 
-  public Expression expression;
+  /** The label (if there is one). */
+  protected final Expression expression;
 
-  public BranchStatement(final Expression expression, final int sourceStart, final int sourceEnd) {
+  protected BranchStatement(final Expression expression, final int sourceStart, final int sourceEnd) {
     super(sourceStart, sourceEnd);
     this.expression = expression;
   }
 
   /**
    * Get the variables from outside (parameters, globals ...)
-   * @return the variables from outside
+   *
+   * @param list the list where we will put variables
    */
-  public List getOutsideVariable() {
-    if (expression == null) {
-      return new ArrayList();
+  public final void getOutsideVariable(final List list) {
+    if (expression != null) {
+      expression.getOutsideVariable(list);
     }
-    return expression.getOutsideVariable();
   }
 
   /**
    * get the modified variables.
-   * @return the variables from we change value
+   *
+   * @param list the list where we will put variables
    */
-  public List getModifiedVariable() {
-    if (expression == null) {
-      return new ArrayList();
+  public final void getModifiedVariable(final List list) {
+    if (expression != null) {
+    expression.getModifiedVariable(list);
     }
-    return expression.getModifiedVariable();
   }
 
   /**
    * Get the variables used.
-   * @return the variables used
+   *
+   * @param list the list where we will put variables
    */
-  public List getUsedVariable() {
-    if (expression == null) {
-      return new ArrayList();
+  public final void getUsedVariable(final List list) {
+    if (expression != null) {
+      expression.getUsedVariable(list);
     }
-    return expression.getUsedVariable();
   }
 }