/**
* 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 modified
*/
- public List getModifiedVariable() {
- return new ArrayList(1);
+ public void getModifiedVariable(final List list) {
}
/**
* Get the variables used.
- * @return the variables used
*/
- public List getUsedVariable() {
+ public void getUsedVariable(final List list) {
final String varName;
if (name != null) {
varName = name;
} else {
varName = expression.toStringExpression();//todo : do a better thing like evaluate this ??
}
- if (arrayContains(SPECIAL_VARS, name)) {
- return new ArrayList(1);
+ if (!arrayContains(SPECIAL_VARS, name)) {
+ list.add(new VariableUsage(varName, sourceStart));
}
- final ArrayList list = new ArrayList(1);
- list.add(new VariableUsage(varName, sourceStart));
- return list;
}
}