Update of /cvsroot/nice/Nice/stdlib/nice/lang/reflect
In directory sc8-pr-cvs1:/tmp/cvs-serv7669/stdlib/nice/lang/reflect
Modified Files:
methods.nice instances.nice
Log Message:
Removed uses of 'object(...)', which is not needed anymore.
Index: methods.nice
===================================================================
RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/reflect/methods.nice,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** methods.nice 10 Dec 2003 23:26:25 -0000 1.2
--- methods.nice 12 Dec 2003 12:55:25 -0000 1.3
***************
*** 27,31 ****
let cl = obj.getClass();
let method = cl.getMethod(methodName, args.map(canonicalClass));
! return cast( method.invoke(object(obj), args) );
}
--- 27,31 ----
let cl = obj.getClass();
let method = cl.getMethod(methodName, args.map(canonicalClass));
! return cast( method.invoke(obj, args) );
}
***************
*** 37,41 ****
java.io.File f2 = new java.io.File(".");
! int res = f1.call("compareTo", [object(f2)]);
assert res == 0;
}
--- 37,41 ----
java.io.File f2 = new java.io.File(".");
! int res = f1.call("compareTo", [f2]);
assert res == 0;
}
***************
*** 48,52 ****
{
let method = obj.getClass().getMethod(methodName, null);
! return cast( method.invoke(object(obj), null) );
}
--- 48,52 ----
{
let method = obj.getClass().getMethod(methodName, null);
! return cast( method.invoke(obj, null) );
}
***************
*** 68,72 ****
{
let method = obj.getClass().getMethod(methodName, [canonicalClass(arg1)]);
! return cast( method.invoke(object(obj), [object(arg1)]) );
}
--- 68,72 ----
{
let method = obj.getClass().getMethod(methodName, [canonicalClass(arg1)]);
! return cast( method.invoke(obj, [arg1]) );
}
Index: instances.nice
===================================================================
RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/reflect/instances.nice,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** instances.nice 8 Oct 2003 17:10:18 -0000 1.1
--- instances.nice 12 Dec 2003 12:55:25 -0000 1.2
***************
*** 41,48 ****
void _testInstances()
{
! _TestS tS = newInstance("nice.lang.reflect._TestS", [object("ABC")]);
assert tS.s.equals("ABC");
! _TestI tI = newInstance("nice.lang.reflect._TestI", [object(int(42))]);
assert tI.i == 42;
}
--- 41,48 ----
void _testInstances()
{
! _TestS tS = newInstance("nice.lang.reflect._TestS", ["ABC"]);
assert tS.s.equals("ABC");
! _TestI tI = newInstance("nice.lang.reflect._TestI", [int(42)]);
assert tI.i == 42;
}
***************
*** 78,82 ****
Class argClass1 = arg1.canonicalClass();
let constructor = cl.getConstructor([argClass1]);
! return cast(constructor.newInstance([object(arg1)]));
}
--- 78,82 ----
Class argClass1 = arg1.canonicalClass();
let constructor = cl.getConstructor([argClass1]);
! return cast(constructor.newInstance([arg1]));
}
***************
*** 104,108 ****
Class argClass2 = arg2.canonicalClass();
let constructor = cl.getConstructor([argClass1, argClass2]);
! return cast(constructor.newInstance([object(arg1),object(arg2)]));
}
--- 104,108 ----
Class argClass2 = arg2.canonicalClass();
let constructor = cl.getConstructor([argClass1, argClass2]);
! return cast(constructor.newInstance([arg1,arg2]));
}
|