Method Summary |
|
abstract protected JsCleanup | createCleanupObject() Create an object which frees the underlying JS resource. |
final protected void | finalize() When the Java object is garbage-collected, make sure the associated JS
resource is freed. |
abstract public boolean | getBoolean() Get the value of the object as a boolean. |
abstract public int | getInt() Get the value of the object as an integer. |
abstract public double | getNumber() Get the value of the object as a double. |
abstract public String | getString() Get the value of the object as a string. |
abstract public String | getTypeString() Returns a human-readable string describing the type of the JS object. |
abstract public Object | getWrappedJavaObject() Unwrap a wrapped Java object. |
abstract public boolean | isBoolean() Returns true if the JS value is a boolean. |
abstract public boolean | isInt() Returns true if getInt() can be used on this value. |
abstract public boolean | isJavaScriptObject() Returns true if the JS value is a native JS object. |
abstract public boolean | isNull() Returns true if the JS value is null. |
abstract public boolean | isNumber() Returns true if the JS value is a numeric type. |
abstract public boolean | isString() Returns true if the JS value is a string. |
abstract public boolean | isUndefined() Returns true if the JS value is undefined (void). |
abstract public boolean | isWrappedJavaObject() Returns true if the JS value is a wrapped Java object. |
public static void | mainThreadCleanup() The main thread should call this from time to time to release hosted-mode
objects that Java is no longer referencing. |
abstract public void | setBoolean(boolean val) Sets the JS object to be a boolean value. |
abstract public void | setByte(byte val) Sets the JS object to be a number, passed as an byte. |
abstract public void | setChar(char val) Sets the JS object to be a number, passed as a char. |
abstract public void | setDouble(double val) Sets the JS object to be a number, passed as a double. |
abstract public void | setInt(int val) Sets the JS object to be a number, passed as an int. |
abstract public void | setNull() Set the JS object to be null. |
abstract public void | setShort(short val) Sets the JS object to be a number, passed as a short. |
abstract public void | setString(String val) Set the JS object to the supplied string. |
abstract public void | setUndefined() Set the JS object to be undefined (void). |
abstract public void | setValue(JsValue other) Make this JsValue refer to the same underlying object as another JsValue. |
abstract public void | setWrappedJavaObject(CompilingClassLoader cl, T val) Set the JS object to the supplied object, which will be wrapped in a
platform-dependent JavaScript class. |
public String | toString() Produce a string representation of the JsValue. |