The java::info Command


Usage:

java::info option ?arg arg ...?

The java::info command provides introspection for Java classes, objects, and Beans. The valid options for this command are:

class javaObj
Returns the class name of the specified Java object.

events objOrClass
Returns a list of the fully-qualified names of all the event interfaces of the Java class or object. The events of a Java class are determined by the JavaBean design patterns. Usually, if a Java class has the methods addXXXListener and removeXXXListener and XXX is the name of an interface, then XXX is considered as an event interface of the Java class.

baseclass objOrClass
Returns the base class name of the specified class or Java object. For example, the base class of a Java array object of type String[][][] is java.lang.String. If the class or Java object is not an array, the base class is the same as the class.

dimensions objOrClass
Returns the number of dimensions of the specified array class or Java array object. If the class or Java object is not an array, the number of dimensions is 0.

fields ?-type? ?-static? objOrClass
Returns a list of fieldSignatures of accessible fields of the specified class or Java object (see Signatures section). For shadowed superclass fields, a full fieldSignature is returned. For all other fields, the fieldSignature is simple. If the ?-type? flag is used, then each element of the result list is a pair containing the data type and fieldSignature. If the -static flag is used, static fields will appear in the result list. Otherwise, only non-static fields will appear in the result list.

methods ?-type? ?-static? objOrClass
Returns a list of accessible methods of the specified class or Java object. If -type is not used, each element in the list is the full signature of a method. If -type is used, each element in the list is in turn a list in the form {type sig exceptions}, where type is the method's return type, sig is the method's full signature, and exceptions is a list of the fully-qualified names of all the checked exceptions that can be thrown by this method. If the method does not throw exceptions, exceptions is the empty list. If the -static flag is used, only static methods will appear in the result list. Otherwise, non-static methods from the class and its superclasses will appear in the result list.

constructors objOrClass
Returns a list of the full signatures of accessible constructors of the specified class or Java object.

properties ?-type? objOrClass
Returns a list of the names of Java Bean properties of the specified class or Java object. If the ?-type? flag is used, then each element of the result list is a pair containing the data type and name of the property.

superclass objOrClass
Returns the name of the immediate superclass of the specified Java object or class. If objOrClass is an instance of java.lang.Object, then the empty string is returned.

Copyright © 1997-1998 Sun Microsystems, Inc.