|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface InterpreterDriver
Defines the interface for a driver for a scripting language interpreter
Nested Class Summary | |
---|---|
static class |
InterpreterDriver.InterpreterException
An object of this class is thrown when an exception is generated while the interpreter is executing a script |
Method Summary | |
---|---|
void |
executeScript(java.lang.String script,
java.lang.String[] argNames,
java.lang.String[] argValues)
Executes the script code contained within the specified string |
void |
executeScriptFile(java.lang.String scriptFile,
java.lang.String[] argNames,
java.lang.String[] argValues)
Executes script contained within a file |
java.lang.String[] |
getSupportedExtensions()
Returns a list of all file extensions associated with the interpreter |
java.lang.String[] |
getSupportedLanguages()
Returns a list of all languages supported by the interpreter |
void |
setVariable(java.lang.String name,
java.lang.String value)
Sets a variable/member to the specified value |
Method Detail |
---|
void executeScript(java.lang.String script, java.lang.String[] argNames, java.lang.String[] argValues) throws InterpreterDriver.InterpreterException
script
- the script codeargNames
- an array containing the names of arguments to be passed to
the evaluationargValues
- an array containing the values of the arguments to be
passed to the evaluation
InterpreterDriver.InterpreterException
- if an exception occurs
while interpreting the scriptvoid executeScriptFile(java.lang.String scriptFile, java.lang.String[] argNames, java.lang.String[] argValues) throws InterpreterDriver.InterpreterException
scriptFile
- the file containing the script to be interpreted. This
must include a suitable extension for the particular
languageargNames
- an array containing the names of arguments to be passed to
the evaluationargValues
- an array containing the values of the arguments to be
passed to the evaluation
InterpreterDriver.InterpreterException
- if an exception occurs
while interpreting the script filejava.lang.String[] getSupportedExtensions()
java.lang.String[] getSupportedLanguages()
void setVariable(java.lang.String name, java.lang.String value)
name
- the name of the variable to setvalue
- the value to assign the variable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |