move static function references to Script.java
[org.ibex.js.git] / src / org / ibex / js / JSReflection.java
index a1db9a8..4d6ec04 100644 (file)
@@ -14,9 +14,9 @@ public class JSReflection extends JS {
 
     public static JS wrap(Object o) throws JSExn {
         if (o == null) return null;
-        if (o instanceof String) return JS.S((String)o);
-        if (o instanceof Boolean) return JS.B(((Boolean)o).booleanValue());
-        if (o instanceof Number) return JS.N((Number)o);
+        if (o instanceof String) return Script.S((String)o);
+        if (o instanceof Boolean) return Script.B(((Boolean)o).booleanValue());
+        if (o instanceof Number) return Script.N((Number)o);
         if (o instanceof JS) return (JS)o;
         if (o instanceof Object[]) {
             // FIXME: get element type here
@@ -33,7 +33,7 @@ public class JSReflection extends JS {
                 private int n = 0;
                 public boolean _hasMoreElements() { return n < arr.length; }
                 public JS _nextElement() {
-                    return n >= arr.length ? null : JS.N(n++);
+                    return n >= arr.length ? null : Script.N(n++);
                 }
             };
         }
@@ -84,7 +84,7 @@ public class JSReflection extends JS {
         } catch (InvocationTargetException it) {
             Throwable ite = it.getTargetException();
             if (ite instanceof JSExn) throw ((JSExn)ite);
-            JS.warn(ite);
+            Script.warn(ite);
             throw new JSExn("unhandled reflected exception: " + ite.toString());
         } catch (SecurityException nfe) { }
         throw new JSExn("called a reflection method with the wrong number of arguments");