All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class nsjava.internal.Interp

java.lang.Object
   |
   +----nsjava.internal.Interp

public class Interp
extends Object

Interpreter interface


Constructor Index

 o Interp()

Method Index

 o eval(String, int)
Eval the passed in string using the tcl interp for the current thread
 o getErrorCode()
Get the global errCode variable.
 o getResult()
Get interpreter result
 o getVar(String, String, int)
Get value of named variable
 o resetResult()
Reset interpreter result
 o setErrorCode(String)
Set the global errCode variable to a two element list where the the first list element is JAVA and the second element is the java object handle for the exception that was just thrown in the current thread.
 o setObjResult(Object, Class, boolean)
Implements converting java object to Tcl format and sets interpreter result appropriately
 o setResult(String)
Set interp result to value
 o setVar(String, String, String, int, boolean)
Set variable result

Constructors

 o Interp
 public Interp()

Methods

 o setErrorCode
 public static native void setErrorCode(String errCode)
Set the global errCode variable to a two element list where the the first list element is JAVA and the second element is the java object handle for the exception that was just thrown in the current thread.

Parameters:
value - set interp result to this value
 o getErrorCode
 public static native String getErrorCode()
Get the global errCode variable. A two element list where the the first list element is JAVA and the second element is the java object handle for the exception that was just thrown in the current thread.

Parameters:
value - set interp result to this value
 o eval
 public static native void eval(String script,
                                int flags) throws TclException
Eval the passed in string using the tcl interp for the current thread

Parameters:
script - script to evaluate
flags - eval flags
Throws: TclException
thrown for usage errors
 o getVar
 public static native String getVar(String part1str,
                                    String part2str,
                                    int flags) throws TclException
Get value of named variable

Parameters:
part1Str - name of var or array name
part2Str - name of array element or null
flags - getVar flags
Returns:
string value of variable
Throws: TclException
thrown for usage errors
 o getResult
 public static native String getResult() throws TclException
Get interpreter result

Returns:
interp result
Throws: TclException
thrown for usage errors
 o setVar
 public static native String setVar(String name1,
                                    String name2,
                                    String value,
                                    int flags,
                                    boolean reflect_p) throws TclException
Set variable result

Parameters:
part1Str - name of var or array name
part2Str - name of array element or null
flags - setVar flags
reflect_p - if true created var is a java object handle
Returns:
interp result
Throws: TclException
thrown for usage errors
 o resetResult
 public static native void resetResult() throws TclException
Reset interpreter result

Throws: TclException
thrown for usage errors
 o setResult
 public static native void setResult(String value)
Set interp result to value

Parameters:
value - to set the interp result to
 o setObjResult
 public static String setObjResult(Object obj,
                                   Class cl,
                                   boolean convert_p) throws TclException
Implements converting java object to Tcl format and sets interpreter result appropriately

Parameters:
obj - Object to be set as interpreter result
type - Type of object for interpreter result
convert_p - convert interpreter result to Tcl string?
Throws: TclException
thrown for usage errors

All Packages  Class Hierarchy  This Package  Previous  Next  Index