Reflection API. Reflection. The dark side of Java

Reflection is a mechanism for examining data about a program at runtime. Reflection lets you analyze fields, methods, and class constructors. Nearly every modern Java technology uses it, so understanding its theoretical and practical aspects is indispensable. For a detailed introduction to the Reflection API, see this article.

Examples of reflection

This lesson will help you figure out not only what reflection is, but also why you need it and when you should use it in your Java code.