blob: 01bef3cd33c1f62d340f01d84bcd92ab64bf4de6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
package minijava.symboltable;
import java.util.Vector;
public class MMethodList extends MType {
Vector<MMethod> methods;
MMethodList() {
methods = new Vector<MMethod>();
}
public void addMethod(MMethod method) {
methods.addElement(method);
}
public int findMethod(String m_name) {
for (int i=0; i<methods.size(); i++) {
if (methods.elementAt(i).name.equals(m_name)) {
return i;
}
}
return -1;
}
public int size() {
return methods.size();
}
}
|