Java Reflection in Action

Ira R. Forman and Nate Forman

2004 | 300 pages
ISBN: 1932394184

Out of Print $44.95 Softbound print + eBook
$35.99 eBook edition (PDF only)


"Contains the best description of Java's dynamic proxies that I've ever come across, and also has notes on the relevant new features in Java 1.5. ...required reading for anyone who's serious about making Java work for them."
-- Dr. Dobb's Journal

"Valuable, both for the professional software developer, and for academics and students who wish to better understand this aspect of object-oriented programming."
-- Computing Reviews

"Exceptional coverage of an area of Java programming that is generally poorly covered and often misunderstood. 10 horseshoes."
-- JavaRanch.com


RESOURCES

DESCRIPTION

You are a Java developer. You are asked to add a simple feature to your application. But "simple" can be deceiving: you have to make many changes, in locations which can be difficult to find.

If this sounds familiar, you want to know about Java reflection. With reflection, you can work smarter by designing flexible applications to which you can easily add likely new requirements. Then, with a few code changes in easy-to-find places, you've got the job done. Reflection adds a new dimension to your programming skills. It will boost your effectiveness.

Java Reflection in Action starts from the basics. It gradually builds a complete understanding, adding as it goes reflective concepts illustrated with many small examples that are useful in real applications.

In a subplot, the book follows a programmer, George, as he tackles common but difficult tasks. In each case, George finds flexible, reflective solutions that replace the usual hard-coded ones. The power of reflection becomes clear through his story.

WHAT'S INSIDE

WHAT THE EXPERTS SAY ABOUT THIS BOOK

"Contains the best description of Java's dynamic proxies that I've ever come across, and also has notes on the relevant new features in Java 1.5. ...required reading for anyone who's serious about making Java work for them."
-- Dr. Dobb's Journal

"Valuable, both for the professional software developer, and for academics and students who wish to better understand this aspect of object-oriented programming."
-- Computing Reviews

"Exceptional coverage of an area of Java programming that is generally poorly covered and often misunderstood. 10 horseshoes."
-- JavaRanch.com

ABOUT THE AUTHORS

Dr. Ira Forman is a senior software engineer at IBM. He started working on reflection in the early 1990s when he developed IBM's SOM Metaclass Framework. Nate Forman works for Ticom Geomatics where he uses reflection in day-to-day problems. Ira and Nate are father and son. They live in Austin, Texas.

SAMPLE CHAPTERS

Two sample chapters of Java Reflection in Action are available in PDF format. You need Adobe's free Acrobat Reader software to view it. You may download Acrobat Reader here.

Chapter 1
Chapter 5

WHAT REVIEWERS ARE SAYING

"Stands out for its clarity, rigour and simplicity...particularly interesting and rich of implications. A wide and authoritative bibliography contributes to enhance the validity of the text."
-- JUG Sardegna, Italy

"Written in a unique style considering real problems and how reflection can be used ...a very informative and helpful book"
-- JavaReference.com

"Over the course of 10 chapters, the authors explore the Java reflection API, a powerful abstraction layer that lets you treat class as objects, and invoke their methods in generic, flexible ways. Every large Java library or application I know uses reflection to load extensions; the more advanced ones use it to construct and customize classes on the fly, inspect the call stack, and profile performance. This book contains the best description of Java's dynamic proxies that I've ever come across, and also has notes on the relevant new features in Java 1.5. It's not for the faint of heart, but it is required reading for anyone who's serious about making Java work for them."
-- Dr. Dobb's Journal, May 2005

"This is a well-written book that presents a difficult topic in a clear and comprehensible fashion. However, it is not for the fainthearted! It assumes that the reader is already a competent Java programmer, who is familiar with relatively large software development tasks. It will be valuable, both for the professional software developer, and for academics and students who wish to better understand this aspect of object-oriented programming."
-- Computing Reviews

"There are only a handful of books that every Java programmer should own. This book manages to enter into that elite group of books by providing exceptional coverage of an area of Java programming that is generally poorly covered and often misunderstood. Reflection is a topic that many programmers know about but don't truly understand. Reflection can provide simple ways to get out of complex problems, which makes it well worth knowing. Reflection is one of those tools that you never knew you needed until you learn it...
The best advice I can give is, buy this book. You will be amazed at the things that you didn't know you could do with Java. 10 horseshoes"
-- JavaRanch.com

"Reflection is a technique that can be of great value in some instances, it's certainly something you need to have in your mental toolbox. This book is by one of the pioneers in reflection and his son who uses reflection to solve day-to-day problems."
-- Books-On-Line

SOURCE CODE

Source code for Java Reflection in Action is available in a single zip archive.

Source Code (127 KB)