|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.helma.javascript.ReloadableScript
public class ReloadableScript
This class represents a JavaScript Resource.
| Constructor Summary | |
|---|---|
ReloadableScript(Repository repository,
RhinoEngine engine)
Construct a Script from the given script repository, munging all contained script resources into one module. |
|
ReloadableScript(Resource resource,
RhinoEngine engine)
Construct a Script from the given script resource. |
|
| Method Summary | |
|---|---|
java.lang.Object |
evaluate(org.mozilla.javascript.Scriptable prototype,
org.mozilla.javascript.Context cx)
Evaluate the script on a module scope and return the result |
protected org.mozilla.javascript.Script |
getMultiScript(org.mozilla.javascript.Context cx)
Get the a script composed out of multiple scripts. |
org.mozilla.javascript.Script |
getScript(org.mozilla.javascript.Context cx)
Get the actual compiled script. |
protected boolean |
isUpToDate()
Checks if the main file or any of the files it includes were updated since the script was last parsed and evaluated. |
org.mozilla.javascript.Scriptable |
load(org.mozilla.javascript.Scriptable prototype,
org.mozilla.javascript.Context cx)
Get a module scope loaded with this script |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ReloadableScript(Resource resource,
RhinoEngine engine)
resource - the JavaScript resource to be applied to this prototype.engine - the rhino engine
public ReloadableScript(Repository repository,
RhinoEngine engine)
repository - the script repository.engine - the rhino engine| Method Detail |
|---|
public org.mozilla.javascript.Script getScript(org.mozilla.javascript.Context cx)
throws org.mozilla.javascript.JavaScriptException,
java.io.IOException
cx - the current Context
org.mozilla.javascript.JavaScriptException - if an error occurred compiling the script code
java.io.IOException - if an error occurred reading the script file
protected org.mozilla.javascript.Script getMultiScript(org.mozilla.javascript.Context cx)
throws org.mozilla.javascript.JavaScriptException,
java.io.IOException
cx - the current Context
org.mozilla.javascript.JavaScriptException - if an error occurred compiling the script code
java.io.IOException - if an error occurred reading the script file
public java.lang.Object evaluate(org.mozilla.javascript.Scriptable prototype,
org.mozilla.javascript.Context cx)
throws org.mozilla.javascript.JavaScriptException,
java.io.IOException
prototype - the parent scope for the modulecx - the rhino context
org.mozilla.javascript.JavaScriptException - if an error occurred evaluating the script file
java.io.IOException - if an error occurred reading the script file
public org.mozilla.javascript.Scriptable load(org.mozilla.javascript.Scriptable prototype,
org.mozilla.javascript.Context cx)
throws org.mozilla.javascript.JavaScriptException,
java.io.IOException
prototype - the parent scope for the modulecx - the rhino context
org.mozilla.javascript.JavaScriptException - if an error occurred evaluating the script file
java.io.IOException - if an error occurred reading the script file
protected boolean isUpToDate()
throws java.io.IOException
java.io.IOException - an I/O exception occurred during the check
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||