|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ScriptEngine
This interface represents an engine that can compile and execute scripts.
Method Summary | |
---|---|
void |
addImport(java.lang.String packageOrClass)
Add a package or class that should be automatically imported in every script. |
ObjectScript |
createObjectScript(java.lang.String script)
Compile a script that can be executed as an object script. |
ToolScript |
createToolScript(java.lang.String script)
Compile a script that can be executed as a tool script. |
void |
executeScript(java.lang.String script,
java.util.Map<java.lang.String,java.lang.Object> variables)
Execute a script. |
java.lang.String |
getFilenameExtension()
Get the filename extension used to identify files written in this engine's language. |
java.lang.String |
getName()
Get the name of the scripting language this engine implements. |
void |
setOutput(java.io.PrintStream out)
Set a stream to which script output should be directed. |
Method Detail |
---|
java.lang.String getName()
java.lang.String getFilenameExtension()
void setOutput(java.io.PrintStream out)
void addImport(java.lang.String packageOrClass) throws java.lang.Exception
java.lang.Exception
void executeScript(java.lang.String script, java.util.Map<java.lang.String,java.lang.Object> variables) throws ScriptException
script
- the source code of the scriptvariables
- a Map defining values for a set of variables that should be defined in the script
ScriptException
ToolScript createToolScript(java.lang.String script) throws ScriptException
script
- the source code of the script
ScriptException
ObjectScript createObjectScript(java.lang.String script) throws ScriptException
script
- the source code of the script
ScriptException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |