*** empty log message ***
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / compiler / ast / BranchStatement.java
index f38d816..2c164c4 100644 (file)
@@ -1,5 +1,8 @@
 package net.sourceforge.phpdt.internal.compiler.ast;
 
+import java.util.List;
+import java.util.ArrayList;
+
 /**
  * Here is a branchstatement : break or continue
  * @author Matthieu Casanova
@@ -8,8 +11,41 @@ public abstract class BranchStatement extends Statement {
 
   public Expression expression;
 
-  public BranchStatement(Expression expression,int sourceStart, int sourceEnd) {
+  public 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
+   */
+  public List getOutsideVariable() {
+    if (expression == null) {
+      return new ArrayList();
+    }
+    return expression.getOutsideVariable();
+  }
+
+  /**
+   * get the modified variables.
+   * @return the variables from we change value
+   */
+  public List getModifiedVariable() {
+    if (expression == null) {
+      return new ArrayList();
+    }
+    return expression.getModifiedVariable();
+  }
+
+  /**
+   * Get the variables used.
+   * @return the variables used
+   */
+  public List getUsedVariable() {
+    if (expression == null) {
+      return new ArrayList();
+    }
+    return expression.getUsedVariable();
+  }
 }