Contents (package MULK.OBJECTIVE-CL)



Intern all objective-c-classes known to the runtime.




collect-classes makes all Objective-C classes known to the Objective-C runtime available as class metaobjects in the objective-c-classes package (that is, the ns namespace).

Calling collect-classes is optional. It allows you to use find-class instead of find-objc-class, but this is purely an aesthetic improvement. collect-classes is not necessary to use Objective-CL productively.


collect-classes may take a very long time to complete depending on the Lisp implementation. Some implementations are not optimised to create such a large number of classes along with their metaclasses on the fly. If you care about portability, you may therefore want to do without the extra convenience that collect-classes offers.

Note 2:

Even though when subclassing a foreign class, it needs to be available as a class metaobject in the objective-c-classes package, you need not call collect-classes before subclassing a foreign class, because define-objective-c-class takes care to intern any missing superclass objects.

See also: