moved ProxyAutoConfig.java from org.ibex.net.HTTP to this package
[org.ibex.js.git] / src / org / ibex / js / JSPrimitive.java
index 57f9c9e..b4f3c9c 100644 (file)
@@ -4,21 +4,18 @@
 
 package org.ibex.js;
 
-class JSPrimitive extends JS.Immutable {
+public class JSPrimitive extends JS.Immutable {
     private static final JS.Method METHOD = new JS.Method();
 
-    public JS callMethod(JS method, JS[] args) throws JSExn {
+    public JS call(JS method, JS[] args) throws JSExn {
+        String s = coerceToString();
+        int slength = s.length();
+
         //#switch(JSU.str(method))
         case "toFixed": throw new JSExn("toFixed() not implemented");
         case "toExponential": throw new JSExn("toExponential() not implemented");
         case "toPrecision": throw new JSExn("toPrecision() not implemented");
         case "toString": return this instanceof JSString ? this : JSU.S(JSU.toString(this));
-        //#end
-            
-        String s = coerceToString();
-        int slength = s.length();
-            
-        //#switch(JSU.toString(method))
         case "substring": {
             int a = args.length >= 1 ? JSU.toInt(args[0]) : 0;
             int b = args.length >= 2 ? JSU.toInt(args[1]) : slength;