//have to find class
addNewClass(classname, todo);
cd=(ClassDescriptor)state.getClassSymbolTable().get(classname);
+
System.out.println("Build class:"+cd);
todo.add(cd);
}
public MethodDescriptor getExecute() {
ClassDescriptor cd = getClass(TypeUtil.TaskClass);
+
+ if(cd == null && state.DSMTASK)
+ throw new Error("Task.java is not included");
+
for(Iterator methodit = cd.getMethodTable().getSet("execute").iterator(); methodit.hasNext();) {
MethodDescriptor md = (MethodDescriptor) methodit.next();
if (md.numParameters()!=0 || md.getModifiers().isStatic())
throw new Error("Case not handled:"+possiblesuper+" "+cd2);
}
+ public TypeDescriptor mostSpecific(TypeDescriptor td1, TypeDescriptor td2) {
+ if( isSuperorType( td1, td2 ) ) {
+ return td2;
+ }
+ if( isSuperorType( td2, td1 ) ) {
+ return td1;
+ }
+ throw new Error( td1+" and "+td2+" have no superclass relationship" );
+ }
+
+ public TypeDescriptor mostSpecific(TypeDescriptor td1, TypeDescriptor td2, TypeDescriptor td3) {
+ return mostSpecific( td1, mostSpecific( td2, td3 ) );
+ }
public boolean isSuperorType(ClassDescriptor possiblesuper, ClassDescriptor cd2) {
if (possiblesuper==cd2)