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
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 © 2016 Actian Corporation. All Rights Reserved.