In computer science, reflection is the ability of a program to examine and possibly modify its high level structure at runtime. It is most common in high-level virtual machine programming languages like Smalltalk, and less common in low-level programming languages like C.
When program source code is compiled, information about the structure of the program is normally lost as lower level code (typically assembly language code is emitted). If a system supports reflection, the structure is preserved as metadata with the emitted code.
Known platforms supporting reflection are:
Lisp, and lisp variants (eg, Scheme) (fully reflective with no distinction between compile-time and run-time)
Smalltalk (fully reflective with no distinction between compile-time and run-time)
More generally, reflection is an activity in computation that reasons about its own computation. The programming paradigm driven by reflection is called reflective programming.