9.6. Reflection

Reflection is a powerful aspect of Java. Reflection is what allows a program to inspect the abilities of a Java class at runtime. Reflection is used chiefly to build RAD tools for Java programmers. Because it is a complex topic and is of less interest to the typical Java application developer, it will only be mentioned here. You can safely skim this section and return to it later if you have a need for it.

The java.lang.reflect package is the package that contains the classes and interfaces necessary to obtain this reflective information. Its primary purpose is to allow access to information regarding the constructors, fields, and methods of loaded classes. Once you have inspected these classes, you can use the reflective items ...

Get Java™ for ColdFusion® Developers now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.