tcl.lang
Class TclIndex

java.lang.Object
  extended by tcl.lang.TclIndex
All Implemented Interfaces:
InternalRep

public class TclIndex
extends Object
implements InternalRep


Method Summary
 void dispose()
          Implement this no-op for the InternalRep interface.
 InternalRep duplicate()
          Returns a dupilcate of the current object.
static int get(Interp interp, TclObject tobj, String[] table, String msg, int flags)
          Tcl_GetIndexFromObj -> get Gets the index into the table of the object.
 String toString()
          Called to query the string representation of the Tcl object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

duplicate

public InternalRep duplicate()
Returns a dupilcate of the current object.

Specified by:
duplicate in interface InternalRep

dispose

public void dispose()
Implement this no-op for the InternalRep interface.

Specified by:
dispose in interface InternalRep

toString

public String toString()
Called to query the string representation of the Tcl object. This method is called only by TclObject.toString() when TclObject.stringRep is null.

Overrides:
toString in class Object
Returns:
the string representation of the Tcl object.

get

public static int get(Interp interp,
                      TclObject tobj,
                      String[] table,
                      String msg,
                      int flags)
               throws TclException
Tcl_GetIndexFromObj -> get Gets the index into the table of the object. Generate an error it it doesn't occur. This also converts the object to an index which should catch the lookup for speed improvement.

Parameters:
interp - the interperter or null
tobj - the object to operate on.
table - the list of commands
msg - used as part of any error messages
flags - may be TCL.EXACT.
Throws:
TclException


Copyright © 2015. All rights reserved.