Jump to: navigation, search

Difference between revisions of "Metaclass"


Line 1: Line 1:
In object-oriented programming, a metaclass is a class whose instances are classes.
+
In UBIK, a MetaClass is used to define the appearance and behavior of a certain set of future content objects.
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.  
+
A MetaClass can, and actually has to, inherit from another MetaClass. This can be a built in UBIK System-MetaClass, which is typically the case when customizing starts in an "empty" data model. Of course, and more likely, it will be another MetaClass that was already created during customizing.
Each language has its own metaobject protocol, a set of rules that govern how objects, classes, and metaclasses interact.
+
  
Often [[Namespaces]] are used as identifiers in Metaclasses, to distinguish different classes.
 
  
 
==Derive new object==
 
==Derive new object==

Revision as of 11:58, 18 May 2012

In UBIK, a MetaClass is used to define the appearance and behavior of a certain set of future content objects.

A MetaClass can, and actually has to, inherit from another MetaClass. This can be a built in UBIK System-MetaClass, which is typically the case when customizing starts in an "empty" data model. Of course, and more likely, it will be another MetaClass that was already created during customizing.


Derive new object

To generate a new metaclass just right-click on the sourceclass (e.g., the Baseclass) and choose Derive new object.

After this the class´s name can be changed in the bottom window ( Details )