// Package Helper Methods //////////////////////////////////////////////////////////////
private static Object wrapInt(int i) { return new Integer(i); }
// Package Helper Methods //////////////////////////////////////////////////////////////
private static Object wrapInt(int i) { return new Integer(i); }
return wrapInt(s.lastIndexOf(search,start));
}
if(method.equals("match")) {
return wrapInt(s.lastIndexOf(search,start));
}
if(method.equals("match")) {
}
if(method.equals("toLowerCase")) return s.toLowerCase();
if(method.equals("toUpperCase")) return s.toUpperCase();
}
if(method.equals("toLowerCase")) return s.toLowerCase();
if(method.equals("toUpperCase")) return s.toUpperCase();
if(o instanceof Boolean) {
// no properties for Booleans
} else if(o instanceof Number) {
if(key.equals("toPrecision") || key.equals("toExponential") || key.equals("toFixed"))
if(o instanceof Boolean) {
// no properties for Booleans
} else if(o instanceof Number) {
if(key.equals("toPrecision") || key.equals("toExponential") || key.equals("toFixed"))
key.equals("seatch") || key.equals("slice") || key.equals("split") || key.equals("toLowerCase") ||
key.equals("toUpperCase") || key.equals("toString") || key.equals("substr")
)
key.equals("seatch") || key.equals("slice") || key.equals("split") || key.equals("toLowerCase") ||
key.equals("toUpperCase") || key.equals("toString") || key.equals("substr")
)
- return new JS.Callable() {
- public Object call(JS.Array args) { return callMethodOnPrimitive(target,method,args); }
+ return new JSCallable() {
+ public Object call(JSArray args) { return callMethodOnPrimitive(target,method,args); }
- private JS.Obj obj;
- public CallableStub(JS.Obj obj, Object method) { this.obj = obj; this.method = method; }
- public Object call(JS.Array args) { return obj.callMethod(method,args,false); }
+ private JSObj obj;
+ public JSCallableStub(JSObj obj, Object method) { this.obj = obj; this.method = method; }
+ public Object call(JSArray args) { return ((JSCallable)obj).call(method,args); }