What Is A Meta-Class?
[See also Section 1.6] A Metaclass is a class’ class. If a class is an object, then that object must have a class (in classical OO anyway). Compilers provide an easy way to picture Metaclasses. Classes must be implemented in some way; perhaps with dictionaries for methods, instances, and parents and methods to perform all the work of being a class. This can be declared in a class named “MetaClass”, or class Class in Java. The Class class can also provide services to application programs, such as returning a set of all methods, instances or parents for review (or even modification), as found in Java. Java’s metaclass Class provides some degree of reflection, including retrieving methods, fields, nested classes, loader, and also the ability to generically create new instances of a class and generically invoke methods on an object. Click for a running JApplet (swing) example in Java.