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
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();
+ }
}