A metaclass , again , has a class description 同样地,一个元类也有类描述。
From comments to packages , including classes themselves , every concept in uml has a metaclass 从注释到包,包括类本身, uml中的每个概念都有一个元类。
Class descriptions with the same set of method pointers constitute a metaclass ? class descriptions are objects , too 有着同一组方法指针的类描述构成一个元类? ?类描述也是对象。
Because there are a few oodbs which support the metaclass mechanism , this methodology has limitation to some degree 但只有少数的oodbs支持元类机制,因此该方法存在一定的局限性。
There is a standard way to write all metaclass constructors so that the selector / method pairs can be specified in any order 这是写所有元类构造函数的标准方试,这样就可以以任意次序指定选择器/方法对偶。
So . m . halper had presented a methodology based on the metaclass mechanism to incorporate the part - whole semantic relationships into oodbs 为此, m . halper等人提出了一种基于元类机制的,将部分-整体语义联系集成到oodbs中的方法。
These three distinct viewpoints discussed above have defined the three object models : class - based , prototype - based , and metaclass - based 而这三种对象模型也就导致了许多不同的程序设计语言(如果我们暂时把静态与动态的差别放在一边) 。
The subclass always includes the superclass and defines a pointer to the class description and to the metaclass description if there is a new one 子类总是包含了基类,还定义指向类描述的指针以及指向元类描述? ?如果有新的的话? ?的指针。
Once we intro ? duce metaclasses , we can finally declare the selector for a dynamically linked method where it belongs : in the same interface file as the metaclass pointer 一旦引入元类,我们终于能在元类指针所在的同一接口头文件里声明动态连接方法专有的选择器。
It ' s remarkable enough when implementations of simple techniques work exactly as expected the first time ; but my first metaclass hack in a new language , six days from a cold standing start 32行代码,还包括注释行,就出现了我所想要的那个类的结构,调用的代码也很容易读。
In object-oriented programming, a metaclass is a class whose instances are classes. Just as an ordinary class defines the behavior of certain objects, a metaclass defines the behavior of certain classes and their instances.