/** An array of expressions in this echo statement. */
public Expression[] expressions;
- public EchoStatement (final Expression[] expressions, final int sourceStart) {
- super(sourceStart, expressions[expressions.length-1].getSourceEnd());
+ public EchoStatement (final Expression[] expressions, final int sourceStart, final int sourceEnd) {
+ super(sourceStart, sourceEnd);
this.expressions = expressions;
}
/**
* 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) {
for (int i = 0; i < expressions.length; i++) {
- list.addAll(expressions[i].getOutsideVariable());
+ expressions[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) {
for (int i = 0; i < expressions.length; i++) {
- list.addAll(expressions[i].getModifiedVariable());
+ expressions[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) {
for (int i = 0; i < expressions.length; i++) {
- list.addAll(expressions[i].getUsedVariable());
+ expressions[i].getUsedVariable(list);
}
- return list;
}
}