CSC/ECE 517 Summer 2008/wiki1 3 aobk: Difference between revisions
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
== Reflection in Ruby and Java == | == 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 | |||
=== Ruby Reflection Sequences === | === Ruby Reflection Sequences === | ||
=== Java Reflection Sequences === | === Java Reflection Sequences === | ||
=== Ruby Reflection vs. Java Reflection === | === Ruby Reflection vs. Java Reflection === |
Revision as of 02:35, 4 June 2008
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