- CLASS
- tcl.lang.Extension -- The base class for building dynamically loadable Tcl
extensions.
- METHODS
- void init(Interp interp)
- void safeInit(Interp safeInterp)
- static void loadOnDemand(Interp interp, String cmdName, String clsName)
- ARGUMENTS
- DESCRIPTION
- init
- safeInit
- loadOnDemand
- SEE ALSO
tcl.lang.Extension -- The base class for building dynamically loadable Tcl
extensions.
void init(Interp interp)
void safeInit(Interp safeInterp)
static void loadOnDemand(Interp interp, String cmdName, String clsName)
- 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.
The Extension class is used to create dynamic Tcl extension, which can
be loaded into a running TclJava enhanced interpreter with the java::load
Tcl command
- init
-
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.
- safeInit
-
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.
- loadOnDemand
-
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.
Interp, Command, CommandWithDispose
Copyright © 1998 Sun Microsystems, Inc.
Copyright © 1995-1997 Roger E. Critchlow Jr.