public class V8Function extends V8Object
BOOLEAN, BYTE, DOUBLE, FLOAT_32_ARRAY, FLOAT_64_ARRAY, INT_16_ARRAY, INT_32_ARRAY, INT_8_ARRAY, INTEGER, NULL, objectHandle, released, STRING, UNDEFINED, UNKNOWN, UNSIGNED_INT_16_ARRAY, UNSIGNED_INT_32_ARRAY, UNSIGNED_INT_8_ARRAY, UNSIGNED_INT_8_CLAMPED_ARRAY, v8, V8_ARRAY, V8_ARRAY_BUFFER, V8_FUNCTION, V8_OBJECT, V8_TYPED_ARRAY
Modifier | Constructor and Description |
---|---|
protected |
V8Function(V8 v8) |
|
V8Function(V8 v8,
JavaCallback javaCallback)
Create a JavaScript function, that when invoked will call
the javaCallback passed to the receiver.
|
Modifier and Type | Method and Description |
---|---|
Object |
call(V8Object receiver,
V8Array parameters)
Invoke the JavaScript function on the current runtime.
|
protected V8Value |
createTwin() |
protected long |
initialize(long runtimePtr,
Object data) |
V8Function |
twin()
Creates a new Java object pointing at the same V8 Value
as this.
|
add, add, add, add, add, addNull, addUndefined, contains, executeArrayFunction, executeBooleanFunction, executeDoubleFunction, executeFunction, executeIntegerFunction, executeJSFunction, executeJSFunction, executeObjectFunction, executeStringFunction, executeVoidFunction, get, getArray, getBoolean, getDouble, getInteger, getKeys, getObject, getString, getType, registerJavaMethod, registerJavaMethod, registerJavaMethod, registerJavaMethod, setPrototype, toString
checkReleased, equals, getHandle, getRuntime, getStringRepresentaion, hashCode, isReleased, isUndefined, jsEquals, release, strictEquals
public V8Function(V8 v8, JavaCallback javaCallback)
v8
- The v8 runtime on which to create this functionjavaCallback
- The callback to invokeprotected V8Function(V8 v8)
protected V8Value createTwin()
createTwin
in class V8Object
protected long initialize(long runtimePtr, Object data)
initialize
in class V8Value
public V8Function twin()
V8Value
public Object call(V8Object receiver, V8Array parameters)
receiver
- The object on which to call the function on. The
receiver will be mapped to 'this' in JavaScript. If receiver is null
or undefined, then the V8 runtime will be used instead.parameters
- The parameters passed to the JS Function.Copyright © 2016. All rights reserved.