2003/11/17 01:53:25
[org.ibex.core.git] / src / org / xwt / js / JSCallable.java
1 package org.xwt.js;
2
3 /** anything that is callable with the () operator and wasn't compiled from JS code */
4 public abstract class JSCallable extends JS {
5
6     // return this from get() if the key was actually a method.
7     public static final Object METHOD = new Object();
8
9     public Object callMethod(Object method, Object a0, Object a1, Object a2, Object[] rest, int nargs) {
10         throw new JS.Exn("attempted to call an undefined method");
11     }
12
13     public Object call(Object a0, Object a1, Object a2, Object[] rest, int nargs) {
14         throw new JS.Exn("you cannot call this object");
15     }
16
17 }
18