- tcl.lang.Extension -- The base class for building dynamically loadable Tcl
- void init(Interp interp)
- void safeInit(Interp safeInterp)
- static void loadOnDemand(Interp interp, String cmdName, String clsName)
- SEE ALSO
tcl.lang.Extension -- The base class for building dynamically loadable Tcl
void init(Interp interp)
void safeInit(Interp safeInterp)
static void loadOnDemand(Interp interp, String cmdName, String clsName)
The Extension class is used to create dynamic Tcl extension, which can
be loaded into a running TclJava enhanced interpreter with the java::load
- Interp interp ()
The interpreter in which the extension is to be loaded.
- Interp safeInterp ()
The interpreter in which the extension is to be loaded safely.
- String cmdName ()
Name of the Tcl command to be loaded.
- String clsName ()
The full pathname of the Java class to load as a Tcl command. The
class should implement the Command interface.
Interp, Command, CommandWithDispose
loading, dynamic extension, safe interpreter
A dynamic Tcl extension should override the init method to to
perform initialization specific to the given extension. Usually, this
means creating new commands inside the interpreter.
The safeInit method is similar to init, but it's used to
perform initializations when the package is loaded into a safe
interpreter. It should only enable features that are deemed "safe" to
be executed by untrusted Tcl scripts.
Note: safe interpreters are not currently implemented in Jacl and this
function is currently only for future compatibility.
The loadOnDemand method arranges a Command implementation
class, specified by clsName, to be loaded into the JVM the first
time the command cmdName is executed; this can reduce the time
it takes to initialize an Extension. The class must implement either
the Command interface or the CommandWithDispose interface.
Copyright © 1998 Sun Microsystems, Inc.
Copyright © 1995-1997 Roger E. Critchlow Jr.