private Object parent;
private boolean reference;
+
private Position position;
private int operator;
super(sourceStart, sourceEnd);
this.variable = variable;
this.parent = parent;
+ position = new Position(sourceStart, sourceEnd);
}
public void setReference(final boolean reference) {
/**
* Get the variables from outside (parameters, globals ...)
- * @return the variables from outside
*/
- public List getOutsideVariable() {
- return new ArrayList(1);
+ public void getOutsideVariable(final List list) {
}
/**
* get the modified variables.
- * @return the variables from we change value
*/
- public List getModifiedVariable() {
- final List list = variable.getUsedVariable();
+ public void getModifiedVariable(final List list) {
+ variable.getUsedVariable(list);
if (initialization != null) {
- list.addAll(initialization.getModifiedVariable());
+ initialization.getModifiedVariable(list);
}
- return list;
}
/**
* Get the variables used.
- * @return the variables used
*/
- public List getUsedVariable() {
+ public void getUsedVariable(final List list) {
if (initialization != null) {
- return initialization.getModifiedVariable();//yes it's getModified variable (in a variable declaration $a = $b, $a is modified, event if you have only $a and no initialization
+ initialization.getUsedVariable(list);
}
- return new ArrayList(1);
}
}