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
-
Interp()
-
-
eval(String, int)
- Eval the passed in string using the tcl interp for the current thread
-
getErrorCode()
- Get the global errCode variable.
-
getResult()
- Get interpreter result
-
getVar(String, String, int)
- Get value of named variable
-
resetResult()
- Reset interpreter result
-
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.
-
setObjResult(Object, Class, boolean)
- Implements converting java object to Tcl format and sets interpreter
result appropriately
-
setResult(String)
- Set interp result to value
-
setVar(String, String, String, int, boolean)
- Set variable result
Interp
public Interp()
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
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
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
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
getResult
public static native String getResult() throws TclException
- Get interpreter result
- Returns:
- interp result
- Throws: TclException
- thrown for usage errors
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
resetResult
public static native void resetResult() throws TclException
- Reset interpreter result
- Throws: TclException
- thrown for usage errors
setResult
public static native void setResult(String value)
- Set interp result to value
- Parameters:
- value - to set the interp result to
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