com.googlecode.android_scripting.interpreter
Interface InterpreterDescriptor


public interface InterpreterDescriptor

Provides interpreter-specific info for execution/installation/removal purposes.

Author:
Alexey Reznichenko (alexey.reznichenko@gmail.com)

Method Summary
 java.util.List<java.lang.String> getArguments(Context context)
          Returns an array of command line arguments required to execute the interpreter (it's essential that the order in the array is consistent with order of arguments in the command line).
 java.io.File getBinary(Context context)
          Returns the binary as a File object.
 java.util.Map<java.lang.String,java.lang.String> getEnvironmentVariables(Context context)
          Should return a map of environment variables names and their values (or null if interpreter does not require any environment variables).
 java.lang.String getExtension()
          Returns supported script-file extension.
 java.lang.String getExtrasArchiveName()
          Returns file name of the extras archive.
 java.lang.String getExtrasArchiveUrl()
          Returns URL location of the extras archive.
 java.lang.String getInteractiveCommand(Context context)
          Returns execution parameters in case when script name is not provided (when interpreter is started in a shell mode);
 java.lang.String getInterpreterArchiveName()
          Returns file name of the interpreter archive.
 java.lang.String getInterpreterArchiveUrl()
          Returns URL location of the interpreter archive.
 java.lang.String getName()
          Returns unique name of the interpreter.
 java.lang.String getNiceName()
          Returns display name of the interpreter.
 java.lang.String getScriptCommand(Context context)
          Returns command line arguments to execute a with a given script (format string with one argument).
 java.lang.String getScriptsArchiveName()
          Returns file name of the scripts archive.
 java.lang.String getScriptsArchiveUrl()
          Returns URL location of the scripts archive.
 int getVersion()
          Returns interpreter version number.
 boolean hasExtrasArchive()
          Returns true if interpreter has an extras archive.
 boolean hasInteractiveMode()
          Returns true if interpreter can be executed in interactive mode.
 boolean hasInterpreterArchive()
          Returns true if interpreter has an archive.
 boolean hasScriptsArchive()
          Returns true if interpreter comes with a scripts archive.
 

Method Detail

getName

java.lang.String getName()
Returns unique name of the interpreter.


getNiceName

java.lang.String getNiceName()
Returns display name of the interpreter.


getExtension

java.lang.String getExtension()
Returns supported script-file extension.


getVersion

int getVersion()
Returns interpreter version number.


getBinary

java.io.File getBinary(Context context)
Returns the binary as a File object. Context is the InterpreterProvider's Context and is provided to find the interpreter installation directory.


getInteractiveCommand

java.lang.String getInteractiveCommand(Context context)
Returns execution parameters in case when script name is not provided (when interpreter is started in a shell mode);


getScriptCommand

java.lang.String getScriptCommand(Context context)
Returns command line arguments to execute a with a given script (format string with one argument).


getArguments

java.util.List<java.lang.String> getArguments(Context context)
Returns an array of command line arguments required to execute the interpreter (it's essential that the order in the array is consistent with order of arguments in the command line).


getEnvironmentVariables

java.util.Map<java.lang.String,java.lang.String> getEnvironmentVariables(Context context)
Should return a map of environment variables names and their values (or null if interpreter does not require any environment variables).


hasInterpreterArchive

boolean hasInterpreterArchive()
Returns true if interpreter has an archive.


hasExtrasArchive

boolean hasExtrasArchive()
Returns true if interpreter has an extras archive.


hasScriptsArchive

boolean hasScriptsArchive()
Returns true if interpreter comes with a scripts archive.


getInterpreterArchiveName

java.lang.String getInterpreterArchiveName()
Returns file name of the interpreter archive.


getExtrasArchiveName

java.lang.String getExtrasArchiveName()
Returns file name of the extras archive.


getScriptsArchiveName

java.lang.String getScriptsArchiveName()
Returns file name of the scripts archive.


getInterpreterArchiveUrl

java.lang.String getInterpreterArchiveUrl()
Returns URL location of the interpreter archive.


getScriptsArchiveUrl

java.lang.String getScriptsArchiveUrl()
Returns URL location of the scripts archive.


getExtrasArchiveUrl

java.lang.String getExtrasArchiveUrl()
Returns URL location of the extras archive.


hasInteractiveMode

boolean hasInteractiveMode()
Returns true if interpreter can be executed in interactive mode.