summaryrefslogtreecommitdiff
path: root/st/ClassInstance.java
diff options
context:
space:
mode:
authorbd-912 <bdunahu@colostate.edu>2024-04-02 23:23:06 -0600
committerbd-912 <bdunahu@colostate.edu>2024-04-02 23:23:06 -0600
commit0ae01301d572b2e69585c4d1cb753ed7fc89dfe3 (patch)
treeaf2923bdaf9f0810f780634af39816c87e902eae /st/ClassInstance.java
parent35b1ec663c4bf233c1beba823d2c2ebd2759289e (diff)
Store SymTable child information as an array of strings
Diffstat (limited to 'st/ClassInstance.java')
-rw-r--r--st/ClassInstance.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/st/ClassInstance.java b/st/ClassInstance.java
index 8b49236..a444f26 100644
--- a/st/ClassInstance.java
+++ b/st/ClassInstance.java
@@ -3,9 +3,9 @@ package st;
import java.util.ArrayList;
public class ClassInstance extends AbstractInstance {
- private ArrayList<TypeInstance> attrs; // the list of class-fields
- private ArrayList<MethodInstance> mtds; // the list of methods
- private String ext; // the name of the extended class (null if none)
+ private ArrayList<String> attrs; // the list of class-fields
+ private ArrayList<String> mtds; // the list of methods
+ private String ext; // the name of the extended class (null if none)
public ClassInstance(String name) {
super(name, TypeEnum.classname);
@@ -22,15 +22,15 @@ public class ClassInstance extends AbstractInstance {
public String toString() {
return name + ":T[" + type + "]E[" +
this.ext + "]A[" + this.attrs.toString() +
- "]";//M[" + this.mtds.toString() + "]";
+ "]M[" + this.mtds.toString() + "]";
}
- public void set_attrs(ArrayList<TypeInstance> attrs) {
+ public void set_attrs(ArrayList<String> attrs) {
this.attrs = attrs;
}
- public void set_mtds(ArrayList<MethodInstance> mtds) {
+ public void set_mtds(ArrayList<String> mtds) {
this.mtds = mtds;
}