[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
8.8 Introspection
Introspection, or reflection, means being able to obtain information dynamically about GOOPS objects. It is perhaps best illustrated by considering an object oriented language that does not provide any introspection, namely C++.
Nothing in C++ allows a running program to obtain answers to the following types of question:
- What are the data members of this object or class?
- What classes does this class inherit from?
- Is this method call virtual or non-virtual?
-
If I invoke
Employee::adjustHoliday()
, what class contains theadjustHoliday()
method that will be applied?
In C++, answers to such questions can only be determined by looking at the source code, if you have access to it. GOOPS, on the other hand, includes procedures that allow answers to these questions — or their GOOPS equivalents — to be obtained dynamically, at run time.
8.8.1 Classes | ||
8.8.2 Instances | ||
8.8.3 Slots | ||
8.8.4 Generic Functions | ||
8.8.5 Accessing Slots |
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated on April 20, 2013 using texi2html 5.0.