Introspection refers to the process by which JavaBeans are inspected to discover their characteristics. This a combination of
-
Explicit Information provided by the BeanInfo interface where the bean fred must have BeanInfo fredBeanInfo
-
A combination of design patterns (naming conventions for methods events properties etc.) and use of the Java Reflection mechanism
|
The Java Core Reflection API allows one to determine information about objects at runtime.
-
It consists of a set of classes in the java.lang.reflect package, enhancements to the Class class and extensions to java.lang package to provide more uniform powerful wrapper classes for the primitive types.
|
The reflection API is used in two ways:
-
lightweight: public methods fields and constructors: this is JavaBean case
-
heavy weight: all aspects of an object: this is Object Serialization, debugger, interpreter and class browser need
|