Basic HTML version of Foils prepared May 19 99

Foil 34 Reflection and Introspection

From Javabeans Basic Information Track Computational Science Course CPS616 -- Spring Semester 1999. by Geoffrey Fox, Nancy McCracken, Wojtek Furmanski

Suns tutorial on Reflection
1 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
2 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.
3 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

in Table To:


© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Mon Jul 5 1999