*** empty log message ***
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / compiler / ast / BranchStatement.java
1 package net.sourceforge.phpdt.internal.compiler.ast;
2
3 import java.util.List;
4 import java.util.ArrayList;
5
6 /**
7  * Here is a branchstatement : break or continue
8  * @author Matthieu Casanova
9  */
10 public abstract class BranchStatement extends Statement {
11
12   public Expression expression;
13
14   public BranchStatement(final Expression expression, final int sourceStart, final int sourceEnd) {
15     super(sourceStart, sourceEnd);
16     this.expression = expression;
17   }
18
19   /**
20    * Get the variables from outside (parameters, globals ...)
21    * @return the variables from outside
22    */
23   public List getOutsideVariable() {
24     if (expression == null) {
25       return new ArrayList();
26     }
27     return expression.getOutsideVariable();
28   }
29
30   /**
31    * get the modified variables.
32    * @return the variables from we change value
33    */
34   public List getModifiedVariable() {
35     if (expression == null) {
36       return new ArrayList();
37     }
38     return expression.getModifiedVariable();
39   }
40
41   /**
42    * Get the variables used.
43    * @return the variables used
44    */
45   public List getUsedVariable() {
46     if (expression == null) {
47       return new ArrayList();
48     }
49     return expression.getUsedVariable();
50   }
51 }