public abstract class RhinoWorkerUtils extends Object
Modifier and Type | Class and Description |
---|---|
static class |
RhinoWorkerUtils.DefaultScopeOperation<T> |
static interface |
RhinoWorkerUtils.ScopeOperation<T> |
Constructor and Description |
---|
RhinoWorkerUtils() |
Modifier and Type | Method and Description |
---|---|
static <R> R |
childScope(org.mozilla.javascript.Scriptable parentScope,
RhinoWorkerUtils.ScopeOperation<R> operation) |
static org.mozilla.javascript.Scriptable |
parse(File source,
String encoding) |
static org.mozilla.javascript.Scriptable |
parse(File source,
String encoding,
Action<org.mozilla.javascript.Context> contextConfig) |
static <T> T |
parseRhino(File rhinoScript,
RhinoWorkerUtils.ScopeOperation<T> operation) |
static String |
readFile(File file,
String encoding) |
static Object |
toJavaValue(Object object) |
static Map<String,Object> |
toMap(org.mozilla.javascript.Scriptable obj) |
static void |
writeFile(String content,
File destination,
String encoding) |
public static <T> T parseRhino(File rhinoScript, RhinoWorkerUtils.ScopeOperation<T> operation)
public static org.mozilla.javascript.Scriptable parse(File source, String encoding, Action<org.mozilla.javascript.Context> contextConfig)
public static <R> R childScope(org.mozilla.javascript.Scriptable parentScope, RhinoWorkerUtils.ScopeOperation<R> operation)