Chapter 3. Type Information and Reflection

Java classes preserve a wealth of information about programmer intent. Rather than just containing a jumble of executable instructions, binary classes[1] also contain large amounts of metadata—data that describes the structure of the binary class. Most of this metadata is type information enumerating the base class, superinterfaces, fields, and methods of the class. Type information is used to make the dynamic linking of code more reliable by verifying at runtime that clients and servers share a common view of the classes they use to communicate.

[1] [LY99] uses the term “class file” instead. This usage encourages the mistaken assumption that classes must live in files, and it will probably be replaced ...

Get Component Development for the Java™ Platform now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.