FileDocCategorySizeDatePackage
ListMethods.javaAPI DocExample735Sat Nov 25 12:55:24 GMT 2000None

ListMethods

public class ListMethods extends Object
List the Constructors and methods
author
Ian F. Darwin, ian@darwinsys.com
version
$Id: ListMethods.java,v 1.2 2000/11/25 17:55:25 ian Exp $

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] argv)

		if (argv.length == 0) {
			System.err.println("Usage: ListMethods className");
			return;
		}
		Class c = Class.forName(argv[0]);
		Constructor[] cons = c.getConstructors();
		printList("Constructors", cons);
		Method[] meths = c.getMethods();
		printList("Methods", meths);
	
static voidprintList(java.lang.String s, java.lang.Object[] o)

		System.out.println("*** " + s + " ***");
		for (int i=0; i<o.length; i++)
			System.out.println(o[i].toString());