A metaclass describes commen behaviour for classes, like a class does for objects
This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these template messages)
This article possibly contains original research. Please improve it by verifying the claims made and adding inline citations. Statements consisting only of original research should be removed.(September 2013) (Learn how and when to remove this message)
This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed. Find sources: "Metaclass" – news · newspapers · books · scholar · JSTOR(September 2013) (Learn how and when to remove this message)
(Learn how and when to remove this message)
In object-oriented programming, a metaclass is a class whose instances are also classes. Just as an ordinary class defines the behavior of certain objects, a metaclass defines the behavior of certain classes and their instances. Not all object-oriented programming languages support metaclasses. Among those that do, the extent to which metaclasses can override any given aspect of class behavior varies. Metaclasses can be implemented by having classes be first-class citizens, in which case a metaclass is simply an object that constructs classes. Each language has its own metaobject protocol, a set of rules that govern how objects, classes, and metaclasses interact.[1] Metaclasses can be used, for example, to generate code automatically, or in developing frameworks.[2]
^Ira R. Forman and Scott Danforth (1999). Putting Metaclasses to Work. ISBN 0-201-43305-2.
^AloorRavi, Sulekha (2022). Metaprogramming with Python. Birmingham: Packt Publishing.
programming, a metaclass is a class whose instances are also classes. Just as an ordinary class defines the behavior of certain objects, a metaclass defines...
is created, a corresponding metaclass is created automatically; it does not have a name independent of that of the metaclass for which it was created–metaclasses...
in Groovy goes through the metaclass registry. The changed code can only be accessed from Java by going to the metaclass registry. Groovy also allows...
an instance of the metaclass of that class. Metaclasses in turn are also objects, and are all instances of a class named Metaclass. Code blocks—Smalltalk's...
[O]) // select O = [Z, K1, C, K3, A, K2, B, D, E, O] // done. First, a metaclass to enable a short representation of the objects by name instead of the...
eigenvector and eigenspace in mathematics and physics Eigenclass, synonym to metaclass in the Ruby programming language Eigenbehaviour, with its connection to...
Unified Modeling Language (UML) of the Object Management Group (OMG) Metaclass (Semantic Web), a featured allowed by OWL to represent knowledge Multimedia...
which does not possess a native metaobject protocol. Kind (type theory) Metaclass Javassist Joose JavaScript meta object system Moose Perl meta object system...
even classes. Classes, as objects, have a class, which is known as their metaclass. Python also supports multiple inheritance and mixins. The language supports...
a list of slots (member variables in C++/Java parlance) and a special metaclass. Slots can be allocated by class (all instances of a class share the slot)...
cyclic, recursive and shared structures, storage/retrieval of class and metaclass info and include mechanisms for "on the fly" object migration (i.e. to...
many objects in Inform do not inherit from any class, other than the "metaclass" Object. However, objects very frequently have attributes (boolean properties...
All objects are instances of a class, and classes are instances of a MetaClass object. As in LISP, there are no statements, and every line in a ScriptX...