Classes and Methods




\begin{emtabbing}
{\bf defclass}
\it classname \&key \= :super object \\lq  [macro...
...etaclass metaclass \\
\> :element-type t \\
\> :size -1\\
\rm
\end{emtabbing}

creates or redefine a class. When a class is redefined to have different superclass or slot variables, old objects instantiated from the previous class definition will behave unexpectedly, since method definitions assume the new slots disposition.


defmethod classname {(selector lambda-list . body)}* [special]

defines one or more methods of classname. Each selector must be a keyword symbol.


defclassmethod classname {(selector lambda-list . body)}* [macro]



classp object [function]

T if object is a class object, that is, an instance of class metaclass or its subclasses.


subclassp class super [function]

Checks class is a subclass of super.


vector-class-p x [function]

T if x is an instance of vector-class.


delete-method class method-name [function]

The method definition is removed from the specified class.


class-hierarchy class [function]

prints inheritance hierarchy below class.


system:list-all-classes [function]

lists up all the classes defined so far.


system:find-method object selector [function]

tries to find a method specified by selector in the class of object and in its superclass. This is used to know whether object can respond to selector.


system:method-cache [flag] [function]

Interrogates the hit ratio of the method cache, and returns a list of two numbers, hit and miss. If flag is NIL, method caching is disabled. If non-nil flag is given, method cache is purged and caching is enabled.


k-okada 2013-05-21