|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gate.util.Jacl
This class provides access to the Jacl Tcl interpreter, and caters for loading any Tcl scripts that live in the GATE source. It also serves as examples of how Tcl can be used from Java using the Jacl library (which is my excuse for those cases where there was an obvious easier way!).
Note that all GATE Tcl scripts should be in the namespace "GATE".
Field Summary | |
private static boolean |
DEBUG
Debug flag |
private String |
findTclScript
Some Tcl code to find all the .tcl files under a directory. |
private List |
gateScriptsList
This is a list of all the .tcl files in the GATE source, used by the loadScripts() method. |
(package private) String |
goToGateSrcScript
Some Tcl code to get us into the gate/src directory (from gate or a subdir). |
private tcl.lang.Interp |
interp
The Tcl interpreter |
private String |
nl
Local fashion for newlines |
Constructor Summary | |
Jacl()
Construction |
Method Summary | |
(package private) void |
copyGateScripts(List scriptPaths)
Copy scripts from the GATE source tree into the classes dir, so that they will make it into gate.jar, and so that getResource (used by Interp.evalResource) will find them. |
List |
findScripts()
Locate any files named .tcl in the directory hierarchy under . |
List |
findScripts(String prelimScript)
Locate any files named .tcl in the directory hierarchy under . |
tcl.lang.Interp |
getInterp()
Get the interpreter |
(package private) void |
listGateScripts()
Set up the gateScriptsList member. |
void |
loadScripts()
Loads all the scripts in the GATE source. |
void |
loadScripts(List scriptPaths)
Load a list of Tcl scripts. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private static final boolean DEBUG
private tcl.lang.Interp interp
private String nl
String goToGateSrcScript
private String findTclScript
private List gateScriptsList
Constructor Detail |
public Jacl()
Method Detail |
public tcl.lang.Interp getInterp()
public List findScripts() throws tcl.lang.TclException
public List findScripts(String prelimScript) throws tcl.lang.TclException
void copyGateScripts(List scriptPaths) throws tcl.lang.TclException
public void loadScripts(List scriptPaths) throws tcl.lang.TclException
public void loadScripts() throws tcl.lang.TclException
Jacl jacl = new Jacl(); jacl.loadScripts();
void listGateScripts() throws tcl.lang.TclException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |