SymbolTable flags;
SymbolTable methods;
boolean inline=false;
-
ChainHashMap mandatoryImports;
ChainHashMap multiImports;
// inner classes/enum can have these
String surroundingclass=null;
- ClassDescriptor surroudingdesc=null;
+ //adding another variable to indicate depth of this inner class
+ int innerDepth = 0;
+ ClassDescriptor surroundingdesc=null;
+ SymbolTable surroundingNameTable = null;
+
SymbolTable innerdescs;
// for enum type
public void setAsInnerClass() {
this.isInnerClass = true;
}
+ //Will have to call this whenever we are adding the this$ member, ideally should have used a single entrance to add the field. so that entrance could be used to set this flag.
+ public void setInnerDepth( int theDepth ) {
+ innerDepth = theDepth;
+ }
+
+ public int getInnerDepth() {
+ return innerDepth;
+ }
public boolean isInnerClass() {
return this.isInnerClass;
}
public ClassDescriptor getSurroundingDesc() {
- return this.surroudingdesc;
+ return this.surroundingdesc;
}
public void setSurrounding(ClassDescriptor scd) {
- this.surroudingdesc=scd;
+ this.surroundingdesc=scd;
}
public void addInnerClass(ClassDescriptor icd) {
return otherClassname;
}
}
+
+ public void setSurroundingNameTable(SymbolTable nametable) {
+ this.surroundingNameTable = nametable;
+ }
+
+ public SymbolTable getSurroundingNameTable() {
+ return this.surroundingNameTable;
+ }
}