com.voltvoodoo.brew
Class JSRunner
java.lang.Object
com.voltvoodoo.brew.JSRunner
public class JSRunner
- extends java.lang.Object
|
Method Summary |
void |
evalScript(java.lang.String filename)
|
java.lang.String |
evalString(java.lang.String scriptString)
|
java.lang.String |
evalString(java.lang.String scriptString,
java.lang.String sourceName,
java.util.Map<java.lang.String,java.lang.Object> objectsToPutInScope)
|
static java.io.InputStream |
getResourceAsStream(java.lang.String path)
|
static void |
load(org.mozilla.javascript.Context cx,
org.mozilla.javascript.Scriptable thisObj,
java.lang.Object[] args,
org.mozilla.javascript.Function funObj)
Load and execute a set of JavaScript source files. |
static void |
print(org.mozilla.javascript.Context cx,
org.mozilla.javascript.Scriptable thisObj,
java.lang.Object[] args,
org.mozilla.javascript.Function funObj)
Print the string values of its arguments. |
java.lang.String |
readFile(java.lang.String path)
This method is defined as a JavaScript function. |
static void |
warn(org.mozilla.javascript.Context cx,
org.mozilla.javascript.Scriptable thisObj,
java.lang.Object[] args,
org.mozilla.javascript.Function funObj)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JSRunner
public JSRunner()
evalScript
public void evalScript(java.lang.String filename)
evalString
public java.lang.String evalString(java.lang.String scriptString)
throws java.io.IOException
- Throws:
java.io.IOException
evalString
public java.lang.String evalString(java.lang.String scriptString,
java.lang.String sourceName,
java.util.Map<java.lang.String,java.lang.Object> objectsToPutInScope)
print
public static void print(org.mozilla.javascript.Context cx,
org.mozilla.javascript.Scriptable thisObj,
java.lang.Object[] args,
org.mozilla.javascript.Function funObj)
- Print the string values of its arguments.
This method is defined as a JavaScript function. Note that its arguments
are of the "varargs" form, which allows it to handle an arbitrary number
of arguments supplied to the JavaScript function.
warn
public static void warn(org.mozilla.javascript.Context cx,
org.mozilla.javascript.Scriptable thisObj,
java.lang.Object[] args,
org.mozilla.javascript.Function funObj)
readFile
public java.lang.String readFile(java.lang.String path)
- This method is defined as a JavaScript function.
load
public static void load(org.mozilla.javascript.Context cx,
org.mozilla.javascript.Scriptable thisObj,
java.lang.Object[] args,
org.mozilla.javascript.Function funObj)
- Load and execute a set of JavaScript source files.
This method is defined as a JavaScript function.
getResourceAsStream
public static java.io.InputStream getResourceAsStream(java.lang.String path)
Copyright © 2011 FuseSource. All Rights Reserved.