| Package | Description |
|---|---|
| com.eclipsesource.v8 | |
| com.eclipsesource.v8.utils |
| Modifier and Type | Class and Description |
|---|---|
class |
V8
An isolated V8Runtime.
|
class |
V8Array
A V8Value that represents a JavaScript array.
|
class |
V8Function
A V8Value that represents a JavaScript function.
|
| Modifier and Type | Method and Description |
|---|---|
V8Object |
V8Object.add(String key,
boolean value)
Adds a key value pair to the receiver where the value is a boolean.
|
V8Object |
V8Object.add(String key,
double value)
Adds a key value pair to the receiver where the value is a double.
|
V8Object |
V8Object.add(String key,
int value)
Adds a key value pair to the receiver where the value is an integer.
|
V8Object |
V8Object.add(String key,
String value)
Adds a key value pair to the receiver where the value is a String.
|
V8Object |
V8Object.add(String key,
V8Value value)
Adds a key value pair to the receiver where the value is a V8Value.
|
V8Object |
V8Object.addNull(String key)
Associate NULL with the given key.
|
V8Object |
V8Object.addUndefined(String key)
Associate UNDEFINED with the given key.
|
V8Object |
V8Object.executeObjectFunction(String name,
V8Array parameters)
Invoke a JavaScript function and return the result as a V8Object.
|
V8Object |
V8.executeObjectScript(String script)
Executes a JS Script on this runtime and returns the result as a V8Object.
|
V8Object |
V8.executeObjectScript(String script,
String scriptName,
int lineNumber)
Executes a JS Script on this runtime and returns the result as a V8Object.
|
V8Object |
V8Array.getObject(int index)
Returns the V8Object value associated at this index.
|
V8Object |
V8Object.getObject(String key)
Returns the V8Object value associated with this key.
|
V8Object |
V8Object.registerJavaMethod(JavaCallback callback,
String jsFunctionName)
Register a Java method as a JavaScript function.
|
V8Object |
V8Object.registerJavaMethod(JavaVoidCallback callback,
String jsFunctionName)
Register a void Java method as a JavaScript function.
|
V8Object |
V8Object.registerJavaMethod(Object object,
String methodName,
String jsFunctionName,
Class<?>[] parameterTypes)
Register a Java method reflectively given it's name a signature.
|
V8Object |
V8Object.registerJavaMethod(Object object,
String methodName,
String jsFunctionName,
Class<?>[] parameterTypes,
boolean includeReceiver)
Register a Java method reflectively given it's name a signature.
|
V8Object |
V8Object.setPrototype(V8Object value)
Sets the prototype of the receiver.
|
V8Object |
V8Object.twin() |
| Modifier and Type | Method and Description |
|---|---|
Object |
V8Function.call(V8Object receiver,
V8Array parameters)
Invoke the JavaScript function on the current runtime.
|
protected Object |
V8.callObjectJavaMethod(int methodID,
V8Object receiver,
V8Array parameters) |
protected void |
V8.callVoidJavaMethod(int methodID,
V8Object receiver,
V8Array parameters) |
V8Executor |
V8.getExecutor(V8Object key)
Returns the executor associated with the given key.
|
void |
JavaVoidCallback.invoke(V8Object receiver,
V8Array parameters)
Called when a JS Function invokes a the registered Java
method.
|
Object |
JavaCallback.invoke(V8Object receiver,
V8Array parameters)
Called when a JS Function invokes a the registered Java
method.
|
void |
V8.registerV8Executor(V8Object key,
V8Executor executor)
Registers an executor with this runtime.
|
V8Executor |
V8.removeExecutor(V8Object key)
Removes the executor from this runtime.
|
V8Object |
V8Object.setPrototype(V8Object value)
Sets the prototype of the receiver.
|
| Modifier and Type | Method and Description |
|---|---|
static V8Object |
V8ObjectUtils.toV8Object(V8 v8,
Map<String,? extends Object> map)
Creates a V8Object from a java.util.Map.
|
| Modifier and Type | Method and Description |
|---|---|
static Object |
V8ObjectUtils.getValue(V8Object object,
String key)
Gets a Java Object representing the value with the given key in the V8Object.
|
static Map<String,? super Object> |
V8ObjectUtils.toMap(V8Object object)
Creates a Map
|
Copyright © 2015. All rights reserved.