All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class nsjava.internal.Commands

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

public class Commands
extends Object

internal internal java implementation of nsjava commands


Constructor Index

 o Commands()

Method Index

 o callCmd(String[])
Implements nsjava::call command in Tcl.
 o castCmd(String[])
Implements nsjava::cast command in Tcl.
 o dumpCmd(String[])
Dump information on all of the cached objects
 o fieldCmd(String[])
Implements nsjava::field command in Tcl.
 o getExceptionState()
 o importCmd(String[])
Implements nsjava::import command in tcl.
 o infoCmd(String[])
Implements nsjava::info command in Tcl.
 o instanceCmd(String[])
Implements instance commands in Tcl.
 o instanceofCmd(String[])
Implements nsjava::isinstanceof command in Tcl.
 o isnullCmd(String[])
Implements nsjava::isnull command in Tcl.
 o lockCmd(String[])
Implements nsjava::lock command in tcl.
 o newCmd(String[])
Implements nsjava::new command in Tcl.
 o nullCmd(String[])
Implements nsjava::null command in Tcl.
 o object_cache(Object, Class)
Implements conversion and caching of java objects for later access from Tcl
 o objrefcountCmd(String[])
Return the number of Tcl_Obj's referencing a particular java object
 o preserve(String)
Increments the reference count (number of refs in Tcl)
 o preserveCmd(String[])
 o proxycatchCmd(Throwable, String[], int, String)
 o proxyfinalCmd(Throwable, String[], int, String)
 o proxytryCmd(Throwable, String[], int, String, String)
 o release(String)
Decrements the reference count (number of refs in Tcl)
 o release_all()
Remove all of the cached java objects for this thread
 o releaseCmd(String[])
 o removeImportsCmd(String[])
 o throwCmd(String[])
Implements nsjava::throw command in Tcl.
 o tryCmd(String[])
Implements nsjava::try command in Tcl.
 o unlockCmd(String[])
Implements nsjava::unlock command in tcl.

Constructors

 o Commands
 public Commands()

Methods

 o newCmd
 public static void newCmd(String argv[]) throws TclException
Implements nsjava::new command in Tcl. Object handle is set in the interpreter.

Parameters:
argv - argument list passed to command
Throws: TclException
thrown for usage errors
 o nullCmd
 public static void nullCmd(String argv[]) throws TclException
Implements nsjava::null command in Tcl. Null Object handle is set in the interpreter.

Parameters:
argv - argument list passed to command
Throws: TclException
thrown for usage errors
 o isnullCmd
 public static void isnullCmd(String argv[]) throws TclException
Implements nsjava::isnull command in Tcl. Tests the java object handle to see if the object is null. Set's the Tcl interpreter result to a boolean result.

Parameters:
argv - argument list passed to command
Throws: TclException
thrown for usage errors
 o callCmd
 public static void callCmd(String argv[]) throws TclException
Implements nsjava::call command in Tcl. Used to call static methods from Tcl

Parameters:
argv - argument list passed to command
Throws: TclException
thrown for usage errors
 o fieldCmd
 public static void fieldCmd(String argv[]) throws TclException
Implements nsjava::field command in Tcl. Used to call access class or instance fields.

Parameters:
argv - argument list passed to command
Throws: TclException
thrown for usage errors
 o castCmd
 public static void castCmd(String argv[]) throws TclException
Implements nsjava::cast command in Tcl. Used to cast a java object handle to a new object type. New type must be assignable or an exception is thrown.

Parameters:
argv - argument list passed to command
Throws: TclException
thrown for usage errors
 o instanceofCmd
 public static void instanceofCmd(String argv[]) throws TclException
Implements nsjava::isinstanceof command in Tcl. Used to test a java object handle to see if it is an instance of a specified class.

Parameters:
argv - argument list passed to command
Throws: TclException
thrown for usage errors
 o throwCmd
 public static void throwCmd(String argv[]) throws TclException
Implements nsjava::throw command in Tcl. Used to throw a passed in object handle as an exception. The object to be thrown, must be an instance of throwable.

Parameters:
argv - argument list passed to command
Throws: TclException
thrown for usage errors
 o tryCmd
 public static void tryCmd(String argv[]) throws TclException
Implements nsjava::try command in Tcl. Used to catch java exceptions from within Tcl. Used as a replacement for Tcl's catch command when trapping errors from nsjava commands.

Parameters:
argv - argument list passed to command
Throws: TclException
thrown for usage errors
 o infoCmd
 public static void infoCmd(String argv[]) throws TclException
Implements nsjava::info command in Tcl. Used to introspect java objects from within Tcl.

Parameters:
argv - argument list passed to command
Throws: TclException
thrown for usage errors
 o instanceCmd
 public static void instanceCmd(String argv[]) throws TclException
Implements instance commands in Tcl. Used to call instance methods from within Tcl. As an example to create a new instance and call an instance method, you might do the following: set x [nsjava::new {SomeClass java.lang.String} {Hello World}] $x some_method // some_method is called via this command

Parameters:
argv - argument list passed to command
Throws: TclException
thrown for usage errors
 o removeImportsCmd
 public static void removeImportsCmd(String argv[])
 o importCmd
 public static void importCmd(String argv[]) throws TclException
Implements nsjava::import command in tcl.

Parameters:
argv - argument list passed to command
Throws: TclException
thrown for usage errors
 o lockCmd
 public static void lockCmd(String argv[]) throws TclException
Implements nsjava::lock command in tcl.

Parameters:
argv - argument list passed to command
Throws: TclException
thrown for usage errors
 o unlockCmd
 public static void unlockCmd(String argv[]) throws TclException
Implements nsjava::unlock command in tcl.

Parameters:
argv - argument list passed to command
Throws: TclException
thrown for usage errors
 o preserveCmd
 public static boolean preserveCmd(String argv[])
 o releaseCmd
 public static boolean releaseCmd(String argv[]) throws TclException
 o object_cache
 public static String object_cache(Object obj,
                                   Class cls)
Implements conversion and caching of java objects for later access from Tcl

Parameters:
obj - Object to be set as interpreter result
cls - Class of object being cached
Returns:
object handle for cached object.
 o preserve
 public static void preserve(String instance_id)
Increments the reference count (number of refs in Tcl)

Parameters:
instance_id - object handle
 o release
 public static boolean release(String instance_id) throws TclException
Decrements the reference count (number of refs in Tcl)

Parameters:
instance_id - object handle
Returns:
indication of whether object was deleted
Throws: TclException
thrown for usage errors
 o release_all
 public static void release_all()
Remove all of the cached java objects for this thread

 o dumpCmd
 public static void dumpCmd(String argv[])
Dump information on all of the cached objects

 o objrefcountCmd
 public static void objrefcountCmd(String argv[]) throws TclException
Return the number of Tcl_Obj's referencing a particular java object

Parameters:
instance_id - object handle of java object
Returns:
reference count
 o getExceptionState
 public static String getExceptionState()
 o proxytryCmd
 public static String[] proxytryCmd(Throwable pending_exception,
                                    String argv[],
                                    int tcl_code,
                                    String result,
                                    String state_handle) throws Throwable
 o proxycatchCmd
 public static String proxycatchCmd(Throwable pending_exception,
                                    String argv[],
                                    int tcl_code,
                                    String result) throws Throwable
 o proxyfinalCmd
 public static void proxyfinalCmd(Throwable pending_exception,
                                  String argv[],
                                  int tcl_code,
                                  String result) throws Throwable

All Packages  Class Hierarchy  This Package  Previous  Next  Index