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
-
Commands()
-
-
callCmd(String[])
- Implements nsjava::call command in Tcl.
-
castCmd(String[])
- Implements nsjava::cast command in Tcl.
-
dumpCmd(String[])
- Dump information on all of the cached objects
-
fieldCmd(String[])
- Implements nsjava::field command in Tcl.
-
getExceptionState()
-
-
importCmd(String[])
- Implements nsjava::import command in tcl.
-
infoCmd(String[])
- Implements nsjava::info command in Tcl.
-
instanceCmd(String[])
- Implements instance commands in Tcl.
-
instanceofCmd(String[])
- Implements nsjava::isinstanceof command in Tcl.
-
isnullCmd(String[])
- Implements nsjava::isnull command in Tcl.
-
lockCmd(String[])
- Implements nsjava::lock command in tcl.
-
newCmd(String[])
- Implements nsjava::new command in Tcl.
-
nullCmd(String[])
- Implements nsjava::null command in Tcl.
-
object_cache(Object, Class)
- Implements conversion and caching of java objects for later access
from Tcl
-
objrefcountCmd(String[])
- Return the number of Tcl_Obj's referencing a particular java object
-
preserve(String)
- Increments the reference count (number of refs in Tcl)
-
preserveCmd(String[])
-
-
proxycatchCmd(Throwable, String[], int, String)
-
-
proxyfinalCmd(Throwable, String[], int, String)
-
-
proxytryCmd(Throwable, String[], int, String, String)
-
-
release(String)
- Decrements the reference count (number of refs in Tcl)
-
release_all()
- Remove all of the cached java objects for this thread
-
releaseCmd(String[])
-
-
removeImportsCmd(String[])
-
-
throwCmd(String[])
- Implements nsjava::throw command in Tcl.
-
tryCmd(String[])
- Implements nsjava::try command in Tcl.
-
unlockCmd(String[])
- Implements nsjava::unlock command in tcl.
Commands
public Commands()
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
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
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
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
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
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
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
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
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
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
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
removeImportsCmd
public static void removeImportsCmd(String argv[])
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
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
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
preserveCmd
public static boolean preserveCmd(String argv[])
releaseCmd
public static boolean releaseCmd(String argv[]) throws TclException
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.
preserve
public static void preserve(String instance_id)
- Increments the reference count (number of refs in Tcl)
- Parameters:
- instance_id - object handle
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
release_all
public static void release_all()
- Remove all of the cached java objects for this thread
dumpCmd
public static void dumpCmd(String argv[])
- Dump information on all of the cached objects
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
getExceptionState
public static String getExceptionState()
proxytryCmd
public static String[] proxytryCmd(Throwable pending_exception,
String argv[],
int tcl_code,
String result,
String state_handle) throws Throwable
proxycatchCmd
public static String proxycatchCmd(Throwable pending_exception,
String argv[],
int tcl_code,
String result) throws Throwable
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