The Introspector is a utility for developers to figure out
which properties, events, and methods a JavaBean supports.
The Introspector class walks over the class/superclass chain
of the target bean class. At each level it checks if there is a matching
BeanInfo class which provides explicit information about the
bean, and if so uses that explicit information. Otherwise it uses the low
level reflection APIs to study the target class and uses design patterns to
analyze its behaviour and then proceeds to continue the introspection with
its baseclass.
To look for the explicit information of a bean:
The Introspector appends "BeanInfo" to the qualified name
of the bean class, try to use the new class as the "BeanInfo" class. If the
"BeanInfo" class exsits and returns non-null value when queried for explicit
information, use the explicit information
If the first step fails, the Introspector will extract a
simple class name of the bean class by removing the package name from the
qualified name of the bean class, append "BeanInfo" to it. And look for the
simple class name in the packages defined in the "BeanInfo" search path (The
default "BeanInfo" search path is sun.beans.infos). If it
finds a "BeanInfo" class and the "BeanInfo" class returns non-null value when
queried for explicit information, use the explicit information
Introspectoris a utility for developers to figure out which properties, events, and methods a JavaBean supports.The
Introspectorclass walks over the class/superclass chain of the target bean class. At each level it checks if there is a matchingBeanInfoclass which provides explicit information about the bean, and if so uses that explicit information. Otherwise it uses the low level reflection APIs to study the target class and uses design patterns to analyze its behaviour and then proceeds to continue the introspection with its baseclass.To look for the explicit information of a bean:
Introspectorappends "BeanInfo" to the qualified name of the bean class, try to use the new class as the "BeanInfo" class. If the "BeanInfo" class exsits and returns non-null value when queried for explicit information, use the explicit informationIntrospectorwill extract a simple class name of the bean class by removing the package name from the qualified name of the bean class, append "BeanInfo" to it. And look for the simple class name in the packages defined in the "BeanInfo" search path (The default "BeanInfo" search path issun.beans.infos). If it finds a "BeanInfo" class and the "BeanInfo" class returns non-null value when queried for explicit information, use the explicit information