|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nanoko.coffee.mill.utils.RhinoLauncher
public class RhinoLauncher
| Nested Class Summary | |
|---|---|
static class |
RhinoLauncher.ScriptLoader
|
| Method Summary | |
|---|---|
RhinoLauncher |
addClientSideEnvironment()
Add a client side environment to the script context (client-side aware). |
RhinoLauncher |
addJSON()
|
RhinoLauncher |
addRequire(String streamroot)
Add an equivalent to the require method from node in for Rhino. |
Object |
evaluate(Reader reader,
String sourceName)
Evaluates a script from a reader. |
Object |
evaluate(String script,
String sourceName)
Evaluates a script. |
RhinoLauncher |
evaluateChain(InputStream stream,
String sourceName)
Evaluates a script and return RhinoLauncher for a chained script evaluation. |
RhinoLauncher |
evaluateChain(String script,
String sourceName)
Evaluates a script and return RhinoLauncher for a chained script evaluation. |
org.mozilla.javascript.ScriptableObject |
getScope()
|
static RhinoLauncher |
newChain()
|
static RhinoLauncher |
newChain(org.mozilla.javascript.ScriptableObject scope)
|
static RhinoLauncher |
newClientSideAwareChain()
|
static String |
toJSMultiLineString(String data)
Transforms a java multi-line string into javascript multi-line string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public org.mozilla.javascript.ScriptableObject getScope()
public RhinoLauncher addClientSideEnvironment()
RhinoLauncher used to chain evaluation of the scripts.public RhinoLauncher addJSON()
public RhinoLauncher addRequire(String streamroot)
require method from node in for Rhino.
RhinoLauncher used to chain evaluation of the scripts.
IOException
public RhinoLauncher evaluateChain(InputStream stream,
String sourceName)
throws IOException
RhinoLauncher for a chained script evaluation.
stream - InputStream of the script to evaluate.sourceName - the name of the evaluated script.
RhinoLauncher chain with required script evaluated.
IOException - if the script couldn't be retrieved.
public RhinoLauncher evaluateChain(String script,
String sourceName)
RhinoLauncher for a chained script evaluation.
script - the string representation of the script to evaluate.sourceName - the name of the evaluated script.
IOException - if the script couldn't be retrieved.
public Object evaluate(Reader reader,
String sourceName)
throws IOException
reader - Reader of the script to evaluate.sourceName - the name of the evaluated script.
IOException - if the script couldn't be retrieved.
public Object evaluate(String script,
String sourceName)
script - string representation of the script to evaluate.sourceName - the name of the evaluated script.
IOException - if the script couldn't be retrieved.public static RhinoLauncher newChain()
RhinoLauncher for script evaluation chaining.public static RhinoLauncher newChain(org.mozilla.javascript.ScriptableObject scope)
public static String toJSMultiLineString(String data)
http://stackoverflow.com/questions/805107/multiline-strings-in-javascript/
data - a string containing new lines.
public static RhinoLauncher newClientSideAwareChain()
RhinoLauncher for script evaluation chaining.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||