Meta-object_protocol Meta-object_protocol

Meta-object protocol - Definition and Overview

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

See also: OpenC++.

References

Copyright 2009 WordIQ.com - Privacy Policy  :: Terms of Use  :: Contact Us  :: About Us
This article is licensed under the GNU Free Documentation License. It uses material from the this Wikipedia article.