| Index: > A B C D E F G H I J K L M N O P Q R S T U V W X Y Z |
|
|||||
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.
See also: OpenC++.