|
Tea Java Runtime API Version 3.2.4 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.pdmfc.tea.apps.STeaShell
public class STeaShell
Implements a Tea shell.
| Constructor Summary | |
|---|---|
STeaShell()
|
|
| Method Summary | |
|---|---|
void |
addImportDirPath(java.lang.String path)
Adds a component to the end of the list of paths used by the import function in the Tea program. |
void |
addImportDirResource(java.lang.String resourceName)
Addes a component to the end of the list of paths used by the import function in the Tea program. |
int |
execute(java.lang.String[] args)
Executes the Tea script previously specified. |
static void |
main(java.lang.String[] args)
Runs a Tea script contained in a file or read from the Java process standard input. |
void |
setScriptFile(java.lang.String path)
Specifies the pathname of the file containing the Tea script to be executed. |
void |
setScriptResource(java.lang.String resourceName)
Specifies a Java resource whose contents are the Tea script to execute. |
void |
setScriptUrl(java.net.URL url)
Specifies the URL where the script to be executed is to be read from. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public STeaShell()
| Method Detail |
|---|
public void setScriptFile(java.lang.String path)
execute(String[]) method is called.
path - A file path name.
java.io.IOException - Thrown if the given path is not
valid.public void setScriptUrl(java.net.URL url)
execute(String[]) method is called.
url - The URL to read the Tea script from.public void setScriptResource(java.lang.String resourceName)
execute(String[]) method is called.
resourceName - The Java resource containing the Tea script to
be executed.public void addImportDirPath(java.lang.String path)
import function in the Tea program. The given path is
added to the list without any modifications.
path - The path being added to the path list.public void addImportDirResource(java.lang.String resourceName)
import function in the Tea program. The given path is
assumed to be a Java resource name. The component added to the path
list is the URL representing that Java resource.
resourceName - The name of a Java resource that will be added
to the list of import directories.
public int execute(java.lang.String[] args)
throws java.io.IOException,
STeaException
args - The command line arguments to pass to the script. These
will be accesible in the Tea code as a list stored in the
argv variable.
java.io.IOException - Thrown if there were any problems reading
the Tea script.
STeaException - Thrown if there were any problems
compiling or executing the script. This exception can actually be
an instance of SCompileException or
SRuntimeException.public static void main(java.lang.String[] args)
The first command line argument is taken to be the pathname of a Tea script and it will be executed. All the remaining arguments are passed as command line arguments to the Tea script. If no command line arguments are given then it reads a Tea script from standard input.
|
Tea Java Runtime API Version 3.2.4 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||