The Introspector is used to get the BeanInfo
of a Bean. Since it works with an instance of Class, you need
to get the Class of the bean passed to our inspect method.
Now that you have a Class, use the Introspector to get at its BeanInfo.
From the BeanInfo, get the list of properties for the Bean. You will end up with an array of
PropertyDescriptors.
For each element of the PropertyDescriptor array, display the name, datatype, and current value.
From the BeanInfo, get the list of event sets for the Bean. You will end up with an array of
EventSetDescriptors.
For each element of the EventSetDescriptor array, display the name and listener type.
Use the Burro frame provided in Burro.java to test out the inspect
method of Valdez. Burro creates a Frame with a bunch of AWT Beans on it. When you double-click
on a List element, select a Checkbox, or press return in the TextField, Juan
goes to work and inspects the Bean selected. The results of the inspection are shown in the TextArea in
the middle.
The task numbers above are linked to the
step-by-step