public final class Runtime extends EventEmitterImpl
| Modifier and Type | Method and Description |
|---|---|
void |
close()
close the current runtime and shutdown all the engine related resources.
|
void |
config(io.vertx.core.json.JsonObject config)
passes the given configuration to the runtime.
|
void |
enter()
explicitly enter the script engine scope.
|
org.graalvm.polyglot.Value |
eval(org.graalvm.polyglot.Source source)
Evals a given script string.
|
org.graalvm.polyglot.Value |
eval(String script)
Evals a given sript string.
|
org.graalvm.polyglot.Value |
eval(String script,
boolean interactive)
Evals a given sript string.
|
org.graalvm.polyglot.Value |
eval(String script,
String name,
boolean literal)
Evals a given sript string.
|
org.graalvm.polyglot.Value |
eval(String script,
String name,
String contentType,
boolean interactive)
Evals a given script string.
|
org.graalvm.polyglot.Value |
get(String name)
Gets a value from the global scope.
|
void |
leave()
explicitly leave the script engine scope.
|
void |
put(String name,
Object value)
Puts a value to the global scope.
|
emit, onpublic void config(io.vertx.core.json.JsonObject config)
config - given configuration.public org.graalvm.polyglot.Value eval(String script, String name, String contentType, boolean interactive)
script - string containing code.name - string containing name of the script (e.g.: the filename).contentType - the script content typeinteractive - literals are non listed on debug sessionspublic org.graalvm.polyglot.Value eval(org.graalvm.polyglot.Source source)
source - source containing code.public void put(String name, Object value)
name - the key to identify the value in the global scopevalue - the value to store.public org.graalvm.polyglot.Value get(String name)
name - the key to identify the value in the global scopepublic void close()
public void enter()
public void leave()
public org.graalvm.polyglot.Value eval(String script, boolean interactive)
script - string containing code.interactive - literals are non listed on debug sessionspublic org.graalvm.polyglot.Value eval(String script, String name, boolean literal)
script - string containing code.name - string containing name of the script (e.g.: the filename).literal - literals are non listed on debug sessionspublic org.graalvm.polyglot.Value eval(String script)
script - string containing code.Copyright © 2019. All rights reserved.