The Source for Java Technology Collaboration
User: Password:
Register | Login help    

Search

Online Books:
java.net on MarkMail:


 E-mail  Print

Hardcore Java Excerpt

Wed, 2004-05-05

{cs.r.title}

Book Excerpt



In this chapter from Hardcore Java, "Practical Reflection," Robert Simmons Jr. writes: "Reflection is one of the least understood aspects of Java, but also one of the most powerful. Reflection is used in almost every major production product on the market, yet it often has to be learned from developers who are already experts, and these developers are often few and far between. The reason for using reflection is because of the difficulties in building complex projects in a short time."

As an example, he writes that "you can use reflection to build panels that construct themselves on the fly according to the structure of the object they are displaying. Instead of designing 200 panels, you can design a tool that builds panels and works for any object. Despite the added complexity of the code introduced by using reflection, creating systems with reflection-based tools is significantly faster and much cheaper to maintain."

This book excerpt is from Hardcore Java, by Robert Simmons, Jr., copyright 2004. All rights reserved. This chapter is posted with permission from O'Reilly Media.

We are presenting this book excerpt as a PDF download. The file size is a little under 500KB. Download Chapter 9, "Practical Reflection."

Robert Simmons, Jr. started programming when floppy disks were really floppy and 64KB of RAM was considered state-of-the-art.
Related Topics >> Programming      
Comments
Comments are listed in date ascending order (oldest first)