SymbolTable flags;
SymbolTable methods;
+ Hashtable singleImports;
+ Vector multiImports;
+
int numstaticblocks = 0;
int numstaticfields = 0;
boolean isClassLibrary=false;
+ String sourceFileName;
+
public ClassDescriptor(String classname, boolean isInterface) {
this("", classname, isInterface);
}
public ClassDescriptor(String packagename, String classname, boolean isInterface) {
+ //make the name canonical by class file path (i.e. package)
super(classname);
superclass=null;
flags=new SymbolTable();
return fieldvec;
}
+ public String getPackage() {
+ return packagename;
+ }
+
public SymbolTable getFlagTable() {
return flags;
}
ClassDescriptor cn=this;
while(true) {
if (cn==null) {
+ // TODO: the original code returned "null" if no super class
+ // ever defines the method. Is there a situation where this is
+ // fine and the client should take other actions? If not, we should
+ // change this warning to an error.
+ System.out.println( "ClassDescriptor.java: WARNING "+md+
+ " did not resolve to an actual method." );
return null;
}
- Set possiblematches=cn.getMethodTable().getSet(md.getSymbol());
- boolean foundmatch=false;
+ Set possiblematches=cn.getMethodTable().getSetFromSameScope(md.getSymbol());
for(Iterator matchit=possiblematches.iterator(); matchit.hasNext();) {
MethodDescriptor matchmd=(MethodDescriptor)matchit.next();
+
if (md.matches(matchmd)) {
return matchmd;
}
return isClassLibrary;
}
+ public void setSourceFileName(String sourceFileName){
+ this.sourceFileName=sourceFileName;
+ }
+
+ public void setImports(Hashtable singleImports, Vector multiImports) {
+ this.singleImports = singleImports;
+ this.multiImports = multiImports;
+ }
+
+ public String getSourceFileName(){
+ return this.sourceFileName;
+ }
+
+ public Hashtable getSingleImportMappings() {
+ return this.singleImports;
+ }
+
}