Class cam.codegen.ClassInterrogator

java.lang.Object
   |
   +----cam.codegen.ClassInterrogator

public class ClassInterrogator
extends Object
This class provides a programming interface to the Java class reflection methods. The class to be interrogated is specifed with the setClass(...) method.

Version:
9/18/98
Author:
Chris Anderson (C) UCLA 1998

Constructor Index

 o ClassInterrogator()

Method Index

 o getArgumentNames(int)
Returns default argument names for the method parameters.
 o getClassName()
Returns the class name (without the package preface)
 o getExceptionNames(int)
Returns the exceptions that are thrown by the public method.
 o getInterfaceStrings()
Returns the interfaces that the class implements.
 o getMethodCount()
Returns the number of public methods that the class implements.
 o getMethodNames()
Returns the public method names.
 o getPackageName()
Returns the package name.
 o getParameterNames(int)
Returns the parameters of the method.
 o getReturnNames()
Returns the names of the objects that are returned by the public methods.
 o getSuperclassName()
Returns the super class (parent class) name.
 o main(String[])
 o setClass(String)
Sets the class to be interrogated.

Constructors

 o ClassInterrogator
 public ClassInterrogator()

Methods

 o setClass
 public void setClass(String Cname) throws ClassNotFoundException
Sets the class to be interrogated. The class name must be the full class name (e.g. the name of the class including the package). The class must reside in a directory that can be located with the CLASSPATH/"package name" construct.

Throws: ClassNotFoundException
if class is not found.
 o getClassName
 public String getClassName()
Returns the class name (without the package preface)

 o getPackageName
 public String getPackageName()
Returns the package name.

 o getSuperclassName
 public String getSuperclassName()
Returns the super class (parent class) name.

 o getInterfaceStrings
 public String[] getInterfaceStrings()
Returns the interfaces that the class implements.

 o getMethodCount
 public int getMethodCount()
Returns the number of public methods that the class implements. Static methods, and constructors are excluded.

 o getMethodNames
 public String[] getMethodNames()
Returns the public method names. Static methods and constructors are excluded.

 o getReturnNames
 public String[] getReturnNames()
Returns the names of the objects that are returned by the public methods.

 o getExceptionNames
 public String[] getExceptionNames(int methodNumber)
Returns the exceptions that are thrown by the public method.

Parameters:
methodNumber - The index of the method. The method index corresponds to the index of the method in the array of method names obtained with getMethodNames().
 o getParameterNames
 public String[] getParameterNames(int methodNumber)
Returns the parameters of the method.

Parameters:
methodNumber - The index of the method. The method index corresponds to the index of the method in the array of method names obtained with getMethodNames().
 o getArgumentNames
 public String[] getArgumentNames(int methodNumber)
Returns default argument names for the method parameters.

Parameters:
methodNumber - The index of the method. The method index corresponds to the index of the method in the array of method names obtained with getMethodNames().
 o main
 public static void main(String args[])