/**
* an echo statement.
* echo something;
+ *
* @author Matthieu Casanova
*/
-public class EchoStatement extends Statement {
+public final class EchoStatement extends Statement {
/** An array of expressions in this echo statement. */
- public Expression[] expressions;
+ private final Expression[] expressions;
- public EchoStatement (final Expression[] expressions, final int sourceStart, final int sourceEnd) {
+ public EchoStatement(final Expression[] expressions, final int sourceStart, final int sourceEnd) {
super(sourceStart, sourceEnd);
this.expressions = expressions;
}
/**
* Return the object into String.
+ *
* @param tab how many tabs (not used here
* @return a String
*/
public String toString(final int tab) {
final String tabs = tabString(tab);
final String str = toString();
- final StringBuffer buff = new StringBuffer(tabs.length()+str.length());
+ final StringBuffer buff = new StringBuffer(tabs.length() + str.length());
return buff.toString();
}
/**
* Get the variables from outside (parameters, globals ...)
+ *
+ * @param list the list where we will put variables
*/
public void getOutsideVariable(final List list) {
for (int i = 0; i < expressions.length; i++) {
/**
* get the modified variables.
+ *
+ * @param list the list where we will put variables
*/
public void getModifiedVariable(final List list) {
for (int i = 0; i < expressions.length; i++) {
/**
* Get the variables used.
+ *
+ * @param list the list where we will put variables
*/
public void getUsedVariable(final List list) {
for (int i = 0; i < expressions.length; i++) {