The java::instanceof Command


Usage:

java::instanceof javaObj type

The java::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, java::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, java::instanceof returns true if the javaObj argument implements this interface. Otherwise, java::instanceof returns 0.

Copyright © 1997-1998 Sun Microsystems, Inc.