Science Fair Project Encyclopedia
Metaobject
Metaobject is any entity that exhibits some aspects of objects, like type, interface, class, methods, attributes, variables, functions, control structures and many more.
Metaobject Protocol is a generalized way to handle a group of objects as whole. This can be useful in implementing generic functions.
A meta-object protocol (MOP) is a set of classes and methods that allow a program to inspect the state of, and alter the behaviour of, the supporting system. Possibly the best known is the one described in the book "The Art of the Metaobject Protocol"; it applies to the Common Lisp Object System and allows the mechanisms of inheritance, method dispatch , class instantiation and so on to be manipulated.
In the case of multiple inheritance, there is the question how conflicting slots and methods of the superclasses are to be resolved. The language designers typically select one solution, and the language users must live with it. A meta-object protocol, on the other hand, makes it possible to change the rules of inheritance and choose a different solution for individual classes.
The lack of a meta-object protocol in languages such as Java is one of the motives for the development of aspect-oriented programming.
External links
References
- Gregor Kiczales, Jim Des Rivieres , Daniel G. Bobrow : The Art of the Metaobject Protocol, MIT Press, ISBN 0262111586 or ISBN 0262610744
See also: OpenC++.
References
The contents of this article is licensed from www.wikipedia.org under the GNU Free Documentation License. Click here to see the transparent copy and copyright details


