Constructor and Description |
---|
JSValue(JSContext ctx)
Creates a new undefined JavaScript value
|
JSValue(JSContext ctx,
java.lang.Object val)
Creates a new JavaScript value from a Java value.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object other) |
JSContext |
getContext()
Gets the JSContext of this value
|
int |
hashCode() |
java.lang.Boolean |
isArray()
Tests whether the value is an array
|
java.lang.Boolean |
isBoolean()
Tests whether the value is boolean
|
java.lang.Boolean |
isDate()
Tests whether the value is a date object
|
boolean |
isEqual(java.lang.Object other)
JavaScript definition of equality (==).
|
java.lang.Boolean |
isFloat32Array()
Tests whether the value is an float32 typed array
|
java.lang.Boolean |
isFloat64Array()
Tests whether the value is an float64 typed array
|
java.lang.Boolean |
isInstanceOfConstructor(JSObject constructor)
Tests whether a value in an instance of a constructor object
|
java.lang.Boolean |
isInt16Array()
Tests whether the value is an Int16 typed array
|
java.lang.Boolean |
isInt32Array()
Tests whether the value is an Int32 typed array
|
java.lang.Boolean |
isInt8Array()
Tests whether the value is an Int8 typed array
|
java.lang.Boolean |
isNull()
Tests whether the value is null
|
java.lang.Boolean |
isNumber()
Tests whether the value is a number
|
java.lang.Boolean |
isObject()
Tests whether the value is an object
|
boolean |
isStrictEqual(java.lang.Object other)
Tests whether two values are strict equal.
|
java.lang.Boolean |
isString()
Tests whether the value is a string
|
java.lang.Boolean |
isTypedArray()
Tests whether the value is a typed array
|
java.lang.Boolean |
isUint16Array()
Tests whether the value is an unsigned Int16 typed array
|
java.lang.Boolean |
isUint32Array()
Tests whether the value is an unsigned Int32 typed array
|
java.lang.Boolean |
isUint8Array()
Tests whether the value is an unsigned Int8 typed array
|
java.lang.Boolean |
isUint8ClampedArray()
Tests whether the value is an unsigned Int8 clamped typed array
|
java.lang.Boolean |
isUndefined()
Tests whether the value is undefined
|
java.lang.Boolean |
toBoolean()
Gets the Boolean value of this JS value
|
JSFunction |
toFunction()
If the JS value is a function, gets the JSFunction
|
JSBaseArray |
toJSArray()
If the JS value is an array, gets the JSArray
|
java.lang.String |
toJSON()
Gets the JSON of this JS value
|
java.lang.Double |
toNumber()
Gets the numeric value of this JS value
|
JSObject |
toObject()
If the JS value is an object, gets the JSObject
|
java.lang.String |
toString() |
long |
valueHash() |
org.liquidplayer.javascript.JNIJSValue |
valueRef()
Gets the JavaScriptCore value reference
|
public JSValue(JSContext ctx)
ctx
- The context in which to create the valuepublic JSValue(JSContext ctx, java.lang.Object val)
ctx
- The context in which to create the valueval
- The Java valuepublic java.lang.Boolean isUndefined()
public java.lang.Boolean isNull()
public java.lang.Boolean isBoolean()
public java.lang.Boolean isNumber()
public java.lang.Boolean isString()
public java.lang.Boolean isArray()
public java.lang.Boolean isDate()
public java.lang.Boolean isTypedArray()
public java.lang.Boolean isInt8Array()
public java.lang.Boolean isInt16Array()
public java.lang.Boolean isInt32Array()
public java.lang.Boolean isUint8ClampedArray()
public java.lang.Boolean isUint8Array()
public java.lang.Boolean isUint16Array()
public java.lang.Boolean isUint32Array()
public java.lang.Boolean isFloat32Array()
public java.lang.Boolean isFloat64Array()
public java.lang.Boolean isObject()
public java.lang.Boolean isInstanceOfConstructor(JSObject constructor)
constructor
- The constructor object to testpublic boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public boolean isEqual(java.lang.Object other)
other
- the value to compare for equalitypublic boolean isStrictEqual(java.lang.Object other)
other
- The value to test againstpublic java.lang.Boolean toBoolean()
public java.lang.Double toNumber()
public java.lang.String toString()
toString
in class java.lang.Object
public JSObject toObject()
public JSFunction toFunction()
public JSBaseArray toJSArray()
public java.lang.String toJSON()
public int hashCode()
hashCode
in class java.lang.Object
public JSContext getContext()
public org.liquidplayer.javascript.JNIJSValue valueRef()
public long valueHash()