2003/11/18 10:47:26
[org.ibex.core.git] / src / org / xwt / js / JSCallable.java
diff --git a/src/org/xwt/js/JSCallable.java b/src/org/xwt/js/JSCallable.java
deleted file mode 100644 (file)
index ac44c5c..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-package org.xwt.js;
-
-/** anything that is callable with the () operator and wasn't compiled from JS code */
-public abstract class JSCallable extends JS {
-
-    // return this from get() if the key was actually a method.
-    public static final Object METHOD = new Object();
-
-    public Object callMethod(Object method, Object a0, Object a1, Object a2, Object[] rest, int nargs) {
-        if (method == null) return call(a0, a1, a2, rest, nargs);
-        Class c = this.getClass();
-        String descrip = c.getName();
-        if (c == Internal.JSCallableStub.class) {
-            descrip = ((Internal.JSCallableStub)this).obj.getClass().getName();
-        }
-        throw new JS.Exn("attempted to call an undefined method ("+method+") on a " + descrip);
-    }
-
-    public Object call(Object a0, Object a1, Object a2, Object[] rest, int nargs) {
-        Class c = this.getClass();
-        String descrip = c.getName();
-        if (c == Internal.JSCallableStub.class) {
-            descrip = ((Internal.JSCallableStub)this).obj.getClass().getName();
-        }
-        throw new JS.Exn("you cannot call this object (of type " + descrip + ")");
-    }
-
-}
-