|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xwt.js.JS
The public API for the JS engine. JS itself is actually a class implementing the absolute minimal amount of functionality for an Object which can be manipulated by JavaScript code. The static methods, fields, and inner classes of JS define the publicly visible API for the XWT JavaScript engine; code outside this package should never depend on anything not defined in this file.
Nested Class Summary | |
static class |
JS.Array
The publicly-visible face of JavaScript Array objects |
static class |
JS.Callable
anything that is callable with the () operator and wasn't compiled from JS code |
static class |
JS.Context
encapsulates the state of a JavaScript "thread" (ie stack) |
static class |
JS.Exn
An exception which can be thrown and caught by JavaScript code |
static class |
JS.GlobalScope
a scope that is populated with js objects and functions normally found in the global scope |
static class |
JS.Graft
the result of a graft |
static class |
JS.Obj
A sensible implementation of the abstract methods in the JS class |
static class |
JS.Scope
Any object which becomes part of the scope chain must support this interface |
static class |
JS.TailCall
|
Constructor Summary | |
JS()
|
Method Summary | |
java.lang.Object |
callMethod(java.lang.Object method,
JS.Array args,
boolean checkOnly)
|
boolean |
coerceToBoolean()
|
java.lang.Number |
coerceToNumber()
|
java.lang.String |
coerceToString()
|
abstract java.lang.Object |
get(java.lang.Object key)
|
abstract java.lang.Object[] |
keys()
|
static Function |
parse(java.lang.String sourceName,
int firstLine,
java.io.Reader sourceCode)
parse and compile a function |
abstract java.lang.Object |
put(java.lang.Object key,
java.lang.Object val)
|
static boolean |
toBoolean(java.lang.Object o)
coerce an object to a Boolean |
static double |
toDouble(java.lang.Object o)
coerce an object to a Double |
static int |
toInt(java.lang.Object o)
coerce an object to an Int |
static long |
toLong(java.lang.Object o)
coerce an object to a Long |
static java.lang.Number |
toNumber(java.lang.Object o)
coerce an object to a Number |
static java.lang.String |
toString(java.lang.Object o)
coerce an object to a String |
java.lang.String |
typeName()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JS()
Method Detail |
public static Function parse(java.lang.String sourceName, int firstLine, java.io.Reader sourceCode) throws java.io.IOException
java.io.IOException
public static boolean toBoolean(java.lang.Object o)
public static long toLong(java.lang.Object o)
public static int toInt(java.lang.Object o)
public static double toDouble(java.lang.Object o)
public static java.lang.Number toNumber(java.lang.Object o)
public static java.lang.String toString(java.lang.Object o)
public abstract java.lang.Object get(java.lang.Object key) throws JS.Exn
JS.Exn
public abstract java.lang.Object put(java.lang.Object key, java.lang.Object val) throws JS.Exn
JS.Exn
public abstract java.lang.Object[] keys()
public java.lang.Object callMethod(java.lang.Object method, JS.Array args, boolean checkOnly) throws JS.Exn
JS.Exn
public java.lang.Number coerceToNumber()
public java.lang.String coerceToString()
public boolean coerceToBoolean()
public java.lang.String typeName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |