X-Git-Url: http://secure.phpeclipse.com diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ReturnStatement.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ReturnStatement.java index 13822d7..61e5cec 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ReturnStatement.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ReturnStatement.java @@ -1,15 +1,14 @@ package net.sourceforge.phpdt.internal.compiler.ast; import java.util.List; -import java.util.ArrayList; /** * A return statement. * @author Matthieu Casanova */ -public class ReturnStatement extends Statement { +public final class ReturnStatement extends Statement { - public Expression expression; + private final Expression expression; public ReturnStatement(final Expression expression, final int sourceStart, final int sourceEnd) { super(sourceStart, sourceEnd); @@ -24,33 +23,32 @@ public class ReturnStatement extends Statement { return s + "return " + expression.toStringExpression();//$NON-NLS-1$ } - /** + /** * Get the variables from outside (parameters, globals ...) - * @return the variables from outside + * + * @param list the list where we will put variables */ - public List getOutsideVariable() { - return new ArrayList(); - } + public void getOutsideVariable(final List list) {} /** * get the modified variables. - * @return the variables modified + * + * @param list the list where we will put variables */ - public List getModifiedVariable() { - if (expression == null) { - return new ArrayList(); + public void getModifiedVariable(final List list) { + if (expression != null) { + expression.getModifiedVariable(list); } - return expression.getModifiedVariable(); } /** * Get the variables used. - * @return the variables used + * + * @param list the list where we will put variables */ - public List getUsedVariable() { - if (expression == null) { - return new ArrayList(); + public void getUsedVariable(final List list) { + if (expression != null) { + expression.getUsedVariable(list); } - return expression.getUsedVariable(); } }