package net.sourceforge.phpdt.internal.compiler.ast;
import java.util.List;
-import java.util.ArrayList;
/**
* @author Matthieu Casanova
*/
-public class HTMLBlock extends Statement {
+public final class HTMLBlock extends Statement {
- public AstNode[] nodes;
+ private final AstNode[] nodes;
public HTMLBlock(final AstNode[] nodes) {
- super(nodes[0].getSourceStart(), nodes[nodes.length-1].getSourceEnd());
+ super(nodes[0].sourceStart, nodes[(nodes.length > 0) ? nodes.length - 1 : 0].sourceEnd);
this.nodes = nodes;
}
final StringBuffer buff = new StringBuffer(tabString(tab));
buff.append("?>");
for (int i = 0; i < nodes.length; i++) {
- buff.append(nodes[i].toString(tab +1));
+ buff.append(nodes[i].toString(tab + 1));
}
buff.append("<?php\n");
return buff.toString();
/**
* Get the variables from outside (parameters, globals ...)
- * @return an empty list
+ *
+ * @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 an empty list
+ *
+ * @param list the list where we will put variables
*/
- public List getModifiedVariable() {
- return new ArrayList();
- }
+ public void getModifiedVariable(final List list) {}
/**
* Get the variables used.
- * @return an empty list
+ *
+ * @param list the list where we will put variables
*/
- public List getUsedVariable() {
- return new ArrayList();
- }
+ public void getUsedVariable(final List list) {}
}