import org.eclipse.jface.text.Position;
import org.eclipse.core.runtime.CoreException;
-import java.util.Hashtable;
-import java.util.Enumeration;
import java.util.ArrayList;
import java.util.List;
/** The name of the method. */
public String name;
- public Hashtable arguments;
+ public ArrayList arguments;
public Statement[] statements;
public MethodDeclaration(final Object parent,
final String name,
- final Hashtable arguments,
+ final ArrayList arguments,
final boolean reference,
final int sourceStart,
final int sourceEnd,
buff.append(name).append("(");//$NON-NLS-1$
if (arguments != null) {
- final Enumeration values = arguments.elements();
- int i = 0;
- while (values.hasMoreElements()) {
- final VariableDeclaration o = (VariableDeclaration) values.nextElement();
+ for (int i = 0; i < arguments.size(); i++) {
+ VariableDeclaration o = (VariableDeclaration) arguments.get(i);
buff.append(o.toStringExpression());
if (i != (arguments.size() - 1)) {
buff.append(", "); //$NON-NLS-1$
}
- i++;
}
}
buff.append(")"); //$NON-NLS-1$
private void getParameters(final List list) {
if (arguments != null) {
- final Enumeration vars = arguments.elements();
- while (vars.hasMoreElements()) {
- final VariableDeclaration variable = (VariableDeclaration) vars.nextElement();
+ for (int i = 0; i < arguments.size(); i++) {
+ VariableDeclaration variable = (VariableDeclaration) arguments.get(i);
list.add(new VariableUsage(variable.name(), variable.sourceStart));
}
}