AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Modifier and Type | Field and Description |
---|---|
protected Charset |
charset |
protected com.pervasive.datarush.coercion.ContextManager |
contextManager |
protected org.mozilla.javascript.Scriptable |
scope |
Constructor and Description |
---|
JavaScriptRunner(com.pervasive.datarush.coercion.ContextManager contextManager) |
Modifier and Type | Method and Description |
---|---|
Set<Map.Entry<String,Object>> |
entrySet() |
Object |
eval(File sourceFile,
CodeSource securityDomain) |
Object |
eval(String source,
CodeSource securityDomain) |
Object |
eval(URL sourceUrl,
CodeSource securityDomain) |
static JavaScriptRunner |
fromArgs(String[] args,
CodeSource domain) |
<T> T |
getAs(Class<T> targetType,
String key,
T defaultValue)
Gets the value to which the specified key is mapped, and coerces that value to the specified target type.
|
static Object |
jsToJava(com.pervasive.datarush.coercion.ContextManager contextManager,
Object jsObject) |
void |
processCliArgs(String[] args,
CodeSource domain) |
Object |
put(String key,
Object value) |
<T> T |
requireAs(Class<T> targetType,
String key)
Gets the value to which the specified key is mapped, and coerces that value to a specified type.
|
clear, clone, containsKey, containsValue, equals, get, hashCode, isEmpty, keySet, putAll, remove, size, toString, values
finalize, getClass, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
protected Charset charset
protected final com.pervasive.datarush.coercion.ContextManager contextManager
protected final org.mozilla.javascript.Scriptable scope
public JavaScriptRunner(com.pervasive.datarush.coercion.ContextManager contextManager)
public <T> T getAs(Class<T> targetType, String key, T defaultValue)
T
- the target typetargetType
- the type to coerce the retrieved value tokey
- the key of the value to retrievedefaultValue
- the default valuetargetType
, to which key
is mapped or
defaultValue
#getAs(Class, String)
public <T> T requireAs(Class<T> targetType, String key)
T
- the target typetargetType
- the type to coerce the retrieved value tokey
- the key of the value to retrievevalueType
, to which key
is mappedpublic Object eval(String source, CodeSource securityDomain)
public Object eval(File sourceFile, CodeSource securityDomain)
public Object eval(URL sourceUrl, CodeSource securityDomain)
public void processCliArgs(String[] args, CodeSource domain)
public static JavaScriptRunner fromArgs(String[] args, CodeSource domain)
Copyright © 2021 Actian Corporation. All rights reserved.