tcl.lang
Class TclParserExtension

java.lang.Object
  extended by tcl.lang.Extension
      extended by tcl.lang.TclParserExtension
All Implemented Interfaces:
Command

public class TclParserExtension
extends Extension
implements Command


Constructor Summary
TclParserExtension()
           
 
Method Summary
 void cmdProc(Interp interp, TclObject[] objv)
           
 void init(Interp interp)
          Initialize the Extension to run in a normal (unsafe) interpreter.
 void safeInit(Interp safeInterp)
          Initialize the Extension to run in a safe interpreter.
 
Methods inherited from class tcl.lang.Extension
loadOnDemand
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TclParserExtension

public TclParserExtension()
Method Detail

init

public void init(Interp interp)
          throws TclException
Description copied from class: Extension
Initialize the Extension to run in a normal (unsafe) interpreter. This usually means creating all the commands provided by this class. A particular implementation can arrange the commands to be loaded on-demand using the loadOnDemand() function.

Specified by:
init in class Extension
Parameters:
interp - current interpreter.
Throws:
TclException

safeInit

public void safeInit(Interp safeInterp)
              throws TclException
Description copied from class: Extension
Initialize the Extension to run in a safe interpreter. This method should be written carefully, so that it initializes the safe interpreter only with partial functionality provided by the Extension that is safe for use by untrusted code. The default implementation always throws a TclException, so that a subclass of Extension cannot be loaded into a safe interpreter unless it has overridden the safeInit() method.

Overrides:
safeInit in class Extension
Parameters:
safeInterp - the safe interpreter in which the Extension should be initialized.
Throws:
TclException

cmdProc

public void cmdProc(Interp interp,
                    TclObject[] objv)
             throws TclException
Specified by:
cmdProc in interface Command
Throws:
TclException