The nsjava::instanceof Command


nsjava::instanceof javaObj type

The nsjava::instanceof command is used to determine if a Java object is of a given type. The javaObj argument specifies an object handle. The type argument specifies a fully qualified interface or class name. If the type argument is a class name, nsjava::instanceof returns 1 if the javaObj argument is an instance of type or an instance of a subclass of type. If the type argument is an interface name, nsjava::instanceof returns true if the javaObj argument implements this interface. Otherwise, nsjava::instanceof returns 0.

Copyright © 1997-1998 Sun Microsystems, Inc.