CSC/ECE 517 Summer 2008/wiki1 3 aobk
Reflection in Ruby and Java
Reflection, in the realm of Computer Science, is the process of introspection by a program. Through the technique of metaprogramming, aspects of a program are examined from within the program itself, which enables the program to modify itself at runtime. By looking at and inside classes and objects, much can be discovered, including the following:
- what objects are contained in a program
- the class hierarchy
- the attributes and methods of the objects contained in the program
- various method information