Update of /cvsroot/nice/Nice/src/bossa/syntax
In directory sc8-pr-cvs1:/tmp/cvs-serv8111/src/bossa/syntax
Modified Files:
RetypedJavaMethod.java
Log Message:
Minor.
Index: RetypedJavaMethod.java
===================================================================
RCS file: /cvsroot/nice/Nice/src/bossa/syntax/RetypedJavaMethod.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** RetypedJavaMethod.java 23 Jun 2003 17:49:01 -0000 1.5
--- RetypedJavaMethod.java 24 Jun 2003 10:00:41 -0000 1.6
***************
*** 103,113 ****
return;
! Type holder = TypeImport.lookup(className);
! if(holder == null)
User.error(this,
"Class " + className + " was not found");
! if(!(holder instanceof ClassType))
User.error(className, className + " is a primitive type");
className = new LocatedString(holder.getName(), className.location());
--- 103,114 ----
return;
! Type holderType = TypeImport.lookup(className);
! if (holderType == null)
User.error(this,
"Class " + className + " was not found");
! if (!(holderType instanceof ClassType))
User.error(className, className + " is a primitive type");
+ ClassType holder = (ClassType) holderType;
className = new LocatedString(holder.getName(), className.location());
***************
*** 133,138 ****
retTypeString.location()));
! reflectMethod =
! ((ClassType) holder).getDeclaredMethod (methodName, javaArgType);
if (reflectMethod == null)
--- 134,138 ----
retTypeString.location()));
! reflectMethod = holder.getDeclaredMethod(methodName, javaArgType);
if (reflectMethod == null)
***************
*** 140,145 ****
try {
reflectMethod =
! ((ClassType) holder).getDeclaredMethod (methodName,
! javaArgType.length);
} catch (Error e) {
User.error(this, "The types of the arguments don't exactly match any of the declarations");
--- 140,144 ----
try {
reflectMethod =
! holder.getDeclaredMethod(methodName, javaArgType.length);
} catch (Error e) {
User.error(this, "The types of the arguments don't exactly match any of the declarations");
***************
*** 151,155 ****
else
User.error(className, "No method named " + methodName + " with " +
! javaArgType.length +" arguments was not found in class " +
holder.getName());
}
--- 150,154 ----
else
User.error(className, "No method named " + methodName + " with " +
! javaArgType.length + " arguments was found in class " +
holder.getName());
}
|