Re: [CLOS] Ensuring a method exists
- From: Pascal Costanza <pc@xxxxxxxxx>
- Date: Wed, 27 Sep 2006 20:36:08 +0200
Didier Verna wrote:
Lars Rune Nøstdal <larsnostdal@xxxxxxxxx> wrote:
Hm, ok - maybe something like this:
(dolist (class (sb-mop:class-direct-subclasses (find-class class)))
Yup, that's the kind of thing I was looking for, thanks. Actually,
I'll use class-direct-SUPERclasses to go up the hierarchy, and also filter out
(find-class 'standard-object) from the check list. But that's the idea.
If you really need the list of all direct and indirect superclasses, you can simply call class-precedence-list. (This may only work when the class is already finalized, that is, roughly when an instance of that class already exists.)
Pascal
--
My website: http://p-cos.net
Common Lisp Document Repository: http://cdr.eurolisp.org
Closer to MOP & ContextL: http://common-lisp.net/project/closer/
.
- Follow-Ups:
- Re: [CLOS] Ensuring a method exists
- From: Didier Verna
- Re: [CLOS] Ensuring a method exists
- References:
- [CLOS] Ensuring a method exists
- From: Didier Verna
- Re: [CLOS] Ensuring a method exists
- From: Lars Rune Nøstdal
- Re: [CLOS] Ensuring a method exists
- From: Didier Verna
- Re: [CLOS] Ensuring a method exists
- From: Lars Rune Nøstdal
- Re: [CLOS] Ensuring a method exists
- From: Didier Verna
- [CLOS] Ensuring a method exists
- Prev by Date: Re: [CLOS] Ensuring a method exists
- Next by Date: Re: [CLOS] Ensuring a method exists
- Previous by thread: Re: [CLOS] Ensuring a method exists
- Next by thread: Re: [CLOS] Ensuring a method exists
- Index(es):
Relevant Pages
|