[Swift-commit] r5173 - trunk/src/org/griphyn/vdl/karajan/lib/swiftscript
wozniak at ci.uchicago.edu
wozniak at ci.uchicago.edu
Mon Sep 26 11:24:26 CDT 2011
Author: wozniak
Date: 2011-09-26 11:24:26 -0500 (Mon, 26 Sep 2011)
New Revision: 5173
Modified:
trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Java.java
Log:
Update wrt DSHandle.toString() change
Modified: trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Java.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Java.java 2011-09-26 15:57:01 UTC (rev 5172)
+++ trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Java.java 2011-09-26 16:24:26 UTC (rev 5173)
@@ -8,7 +8,6 @@
import org.griphyn.vdl.karajan.lib.VDLFunction;
import org.griphyn.vdl.mapping.AbstractDataNode;
import org.griphyn.vdl.mapping.DSHandle;
-import org.griphyn.vdl.mapping.HandleOpenException;
import org.griphyn.vdl.mapping.RootDataNode;
import org.griphyn.vdl.type.Type;
import org.griphyn.vdl.type.Types;
@@ -36,7 +35,7 @@
*/
Method getMethod(DSHandle[] args) {
Method result = null;
- Class clazz;
+ Class<?> clazz;
String lib = "unset";
String name = "unset";
@@ -46,8 +45,8 @@
("@java() requires at least two arguments");
try {
- lib = args[0].toString();
- name = args[1].toString();
+ lib = (String) args[0].getValue();
+ name = (String) args[1].getValue();
clazz = Class.forName(lib);
Method[] methods = clazz.getMethods();
result = null;
@@ -104,7 +103,7 @@
Type returnType(Method method) {
Type result = null;
- Class rt = method.getReturnType();
+ Class<?> rt = method.getReturnType();
if (rt.equals(Double.TYPE))
result = Types.FLOAT;
else if (rt.equals(Integer.TYPE))
More information about the Swift-commit
mailing list