There is more fun to introspection! You can learn a lot about the constructors, methods and variables of any class, not just JavaBeans, by starting with a Class object. You can get one of those in (at least) two ways:
Class c = Class.forName( fully.qualified.className ); Class c = anyObject.getClass();
Look in the Class javadoc for getConstructors, getFields, getMethods, etc. HERE is a toy program I made to educate myself in reflection. The Reflector class might be interesting. Or just strange. [ June 30, 2005: Message edited by: Stan James ]
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
It is the cutting edge of java programming. Introspection helps to get the attributes or property values of a qualified class during runtime. Sample code has been given below to explain the core concepts of Introspection. This code is in working condition, you can use it just by copying it.