
public class JsValueOOPHM extends JsValue
JsValue.DispatchMethod, JsValue.DispatchObject| Constructor and Description |
|---|
JsValueOOPHM()
Create a JsValueMoz object representing the undefined value.
|
JsValueOOPHM(int jsRefId)
Create a JsValueOOPHM object wrapping a JS object given the object
reference id.
|
JsValueOOPHM(JsValueOOPHM other)
Copy constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
getBoolean()
Get the value of the object as a boolean.
|
int |
getInt()
Get the value of the object as an integer.
|
JsValue.DispatchObject |
getJavaObjectWrapper()
Get the wrapper object for a wrapped Java object.
|
BrowserChannel.JsObjectRef |
getJavascriptObject() |
int |
getJavaScriptObjectPointer()
Returns a unique value corresponding to the underlying JavaScript object.
|
double |
getNumber()
Get the value of the object as a double.
|
String |
getString()
Get the value of the object as a string.
|
String |
getTypeString()
Returns a human-readable string describing the type of the JS object.
|
JsValue.DispatchMethod |
getWrappedJavaFunction()
Returns a wrapped Java method.
|
Object |
getWrappedJavaObject()
Unwrap a wrapped Java object.
|
boolean |
isBoolean()
Returns true if the JS value is a boolean.
|
boolean |
isInt()
Returns true if getInt() can be used on this value.
|
boolean |
isJavaScriptObject()
Returns true if the JS value is a native JS object.
|
boolean |
isNull()
Returns true if the JS value is null.
|
boolean |
isNumber()
Returns true if the JS value is a numeric type.
|
boolean |
isString()
Returns true if the JS value is a string.
|
boolean |
isUndefined()
Returns true if the JS value is undefined (void).
|
boolean |
isWrappedJavaFunction()
Returns true if the JS value contains a wrapped Java method.
|
boolean |
isWrappedJavaObject()
Returns true if the JS value is a wrapped Java object.
|
void |
setBoolean(boolean val)
Sets the JS object to be a boolean value.
|
void |
setByte(byte val)
Sets the JS object to be a number, passed as an byte.
|
void |
setChar(char val)
Sets the JS object to be a number, passed as a char.
|
void |
setDouble(double val)
Sets the JS object to be a number, passed as a double.
|
void |
setInt(int val)
Sets the JS object to be a number, passed as an int.
|
void |
setJavascriptObject(BrowserChannel.JsObjectRef jsObject) |
void |
setNull()
Set the JS object to be null.
|
void |
setShort(short val)
Sets the JS object to be a number, passed as a short.
|
void |
setString(String val)
Set the JS object to the supplied string.
|
void |
setUndefined()
Set the JS object to be undefined (void).
|
void |
setValue(JsValue other)
Make this JsValue refer to the same underlying object as another JsValue.
|
void |
setWrappedFunction(String methodName,
JsValue.DispatchMethod dispatchMethod)
Wrap a function call to a Java method in this JavaScript value.
|
<T> 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 static final String JSE_CLASS
public JsValueOOPHM()
public JsValueOOPHM(int jsRefId)
jsRefId - pointer to underlying JsRootedValue as an integer.public JsValueOOPHM(JsValueOOPHM other)
other - JsValueMoz instance to copypublic boolean getBoolean()
JsValuegetBoolean in class JsValuepublic int getInt()
JsValuepublic JsValue.DispatchObject getJavaObjectWrapper()
JsValuegetJavaObjectWrapper in class JsValuepublic BrowserChannel.JsObjectRef getJavascriptObject()
public int getJavaScriptObjectPointer()
JsValuegetJavaScriptObjectPointer in class JsValue0 if JsValue.isJavaScriptObject() is
falsepublic double getNumber()
JsValuepublic String getString()
JsValueJsValue.isString() is true.public String getTypeString()
JsValuegetTypeString in class JsValuepublic JsValue.DispatchMethod getWrappedJavaFunction()
JsValuegetWrappedJavaFunction in class JsValuepublic Object getWrappedJavaObject()
JsValuegetWrappedJavaObject in class JsValuepublic boolean isBoolean()
JsValuepublic boolean isInt()
JsValuepublic boolean isJavaScriptObject()
JsValueisJavaScriptObject in class JsValuepublic boolean isNull()
JsValuepublic boolean isNumber()
JsValuepublic boolean isString()
JsValuepublic boolean isUndefined()
JsValueisUndefined in class JsValuepublic boolean isWrappedJavaFunction()
JsValueisWrappedJavaFunction in class JsValuepublic boolean isWrappedJavaObject()
JsValueisWrappedJavaObject in class JsValuepublic void setBoolean(boolean val)
JsValuesetBoolean in class JsValueval - the boolean value to setpublic void setByte(byte val)
JsValuepublic void setChar(char val)
JsValuepublic void setDouble(double val)
JsValuepublic void setInt(int val)
JsValuepublic void setJavascriptObject(BrowserChannel.JsObjectRef jsObject)
public void setNull()
JsValuepublic void setShort(short val)
JsValuepublic void setString(String val)
JsValuepublic void setUndefined()
JsValuesetUndefined in class JsValuepublic void setValue(JsValue other)
JsValuepublic void setWrappedFunction(String methodName, JsValue.DispatchMethod dispatchMethod)
methodName - the name of the method to invokedispatchMethod - the wrapper objectpublic <T> void setWrappedJavaObject(CompilingClassLoader cl, T val)
JsValuesetWrappedJavaObject in class JsValueT - the type of the Java object to wrapcl - the classloader to create the wrapper object withval - the Java object to wrapCopyright © 2018. All rights reserved.