Package test; import javax.swing. *;
Import java.lang.reflect.field; import java.lang.reflect.constructor; import java.lang.reflect.Modifier; import java.lang.reflect.Method;
PUBLIC CLASS Test {Public Test () {}
public static void printConstructors (Class c1) {Constructor [] constructors = c1.getDeclaredConstructors (); for (int i = 0; i Class [] paramtypes = c.getParameterTypes (); for (int J = 0; j Public Static Void PrintMethods (Class C1) {Method [] methods = c1.getDeclaredMethods (); for (int i = 0; i Class [] paramtypes = m.getParameterTypes (); For (int J = 0; j } System.out.println (");");}} Public Static Void Printfields (class c1) {field [] fields = c1.getdeclaredfields (); For (int i = 0; i } else {name = JOPANE.SHOWINPUTDIALOG ("class name (eg java.util.date):");} try {class c1 = class.forname (name); class superc1 = c1.getsuperclass (); system.out. Println ("Class" Name); System.out.Println ("/ n {/ N"); PrintConstructors (C1); System.out.Println (); PrintMethods (C1); System.out.Println (); Printfields (C1); System.out.Println ("}"); } Catch (ClassNotFoundException E) {E.PrintStackTrace ();} system.exit (0); }