reflections

 

  The package java.lang.reflect holds the Constructor, Field, and Method classes.  java.lang.Object holds the Class class.

 

  To find out what’s in a Class:

 

                Class c = Class.forName(classname);                               

                Field[ ] f = c.getDeclaredFields( );

                Method[ ] m = c.getDeclaredMethods( );

                Class[ ] i = c.getInterfaces( );

                Constructor[ ] cn = c. getDeclaredConstructors( );