scripting
Interface InterpreterDriver

All Known Implementing Classes:
FESIInterpreterDriver, JaclInterpreterDriver, JPythonInterpreterDriver, SkijInterpreterDriver

public abstract interface InterpreterDriver

Driver interface for scripting interpreter. Each language supported must implement this interface. The implementation fo this interface will typically delegate the work to the underlying third-party interpreter. The implementing class must create an instance of itself and register it with InterpreterDriverManager when it is loaded.

Author:
Ramnivas Laddad

Inner Class Summary
static interface InterpreterDriver.InterpreterException
          Nested class for wrapping the exception throw by underlying interpreter while executing scripts
 
Method Summary
 void executeScript(java.lang.String script)
          Execute a script string.
 void executeScriptFile(java.lang.String scriptFile)
          Execute a script file.
 java.lang.String[] getSupportedExtensions()
          Get the extension for supported extensions by this driver
 java.lang.String[] getSupportedLanguages()
          Get the langauges for supported extensions by this driver
 

Method Detail

executeScript

public void executeScript(java.lang.String script)
                   throws InterpreterDriver.InterpreterException
Execute a script string.
Parameters:
script - a string to be interpreted
Throws:
throw - a InterpreterDriver.InterpreterException which wraps the exception throw by underlying interpreter

executeScriptFile

public void executeScriptFile(java.lang.String scriptFile)
                       throws InterpreterDriver.InterpreterException
Execute a script file.
Parameters:
script - a name of file to be interpreted
Throws:
throw - a InterpreterDriver.InterpreterException which wraps the exception throw by underlying interpreter

getSupportedExtensions

public java.lang.String[] getSupportedExtensions()
Get the extension for supported extensions by this driver
Returns:
Array of string containing extension supported

getSupportedLanguages

public java.lang.String[] getSupportedLanguages()
Get the langauges for supported extensions by this driver
Returns:
Array of string containing languages supported