Explaining the Java Reflection API and providing techniques for using it effectively, this guide describes the capabilities that allow a program to examine and modify itself at runtime. The java.lang.reflect package and its uses are covered, including a detailed discussion of Java's dynamic proxy facility. Less obvious reflective capabilities, such as call stack introspection and the Java class loader, are addressed. In recognition of the limitations of Java Reflection, the various ways to use Reflection to generate code and surpass these limitations are detailed. A discussion of performance analysis techniques and a look ahead at what is new in JDK 1.5 is included....