|
Java Reflection in Action
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.
CONTENTS:
Preface
1 A few basics
2 Accessing fields reflectively
3 Using dynamic loading and reflective construction
5 Call Stack Introspection
6 Using class loaders
7 Reflective Code Generation
8 Design Patterns
9 Performance
10 Looking forward
A Reflection and Metaobject Protocols
B Hello World Program
C UML
Glossary
References
Index
|