Fixed some errors in the Repair Generator code.
[repair.git] / Repair / RepairCompiler / MCC / IR / ArrayDescriptor.java
1 package MCC.IR;
2
3 /**
4  * ArrayDescriptor
5  *
6  * wrapper descriptor for an internal field descriptor that
7  * allows arrays
8  */
9
10 public class ArrayDescriptor extends FieldDescriptor {
11
12     FieldDescriptor fd;
13     Expr index;
14
15     public ArrayDescriptor(FieldDescriptor fd, Expr index) {
16         super(fd.getSymbol());
17         this.index = index;
18         this.fd = fd;
19     }
20
21     public FieldDescriptor getField() {
22         return fd;
23     }
24
25     public TypeDescriptor getType() {
26         return fd.getType();
27     }
28
29     public void setType(TypeDescriptor td) {
30         fd.setType(td);
31     }
32
33     public Expr getIndexBound() {
34         return index;
35     }
36
37     public Expr getBaseSizeExpr() {
38         throw new IRException();
39     }
40
41 }