State state;
Hashtable supertable;
Hashtable subclasstable;
+ Hashtable directSubClassTable;
BuildIR bir;
// for interfaces
public void createFullTable() {
subclasstable=new Hashtable();
+ directSubClassTable=new Hashtable();
HashSet tovisit=new HashSet();
HashSet visited=new HashSet();
}
}
+ if(tmp!=null){
+ if(!directSubClassTable.containsKey(tmp)){
+ directSubClassTable.put(tmp, new HashSet());
+ }
+ ((Set)directSubClassTable.get(tmp)).add(cd);
+ }
+
+
while(tmp!=null) {
if (!subclasstable.containsKey(tmp))
subclasstable.put(tmp,new HashSet());
}
}
}
-
+
+ public Set getDirectSubClasses(ClassDescriptor cd) {
+ System.out.println("$$$cd="+cd+" children="+directSubClassTable.get(cd));
+ return (Set)directSubClassTable.get(cd);
+ }
+
public Set getSubClasses(ClassDescriptor cd) {
return (Set)subclasstable.get(cd);
}