From: Robert Monfera
Subject: Slots of a slot definition metaobject
Date: 
Message-ID: <38208019.4EAEA172@fisec.com>
I'm trying to get the list of effective slot definitions of (subclasses
of) slot definition metaobjects.

(clos:class-slots 
   (make-instance 'clos:standard-effective-slot-definition :name ....))

  (of course the slot metaobject instance gets created by ensure-class
   via a customized defmclass in my code)

Unfortunately clos:class-slots or clos:class-direct-slots are not
specialised for standard-object or slot definition metaobjects.

As a side note, class browsers of both ACL and LispWorks allow me to
introspect slot metaobject slots, that's why I think there has to be a
way.

The reason is that I need to define a compute-effective-slot-definition
method for my new class metaobject class.  Although the slot contents
defined by the standard slot metaobject are copied from the direct slot
to the effective slot, for specialized slot metaobjects it is our task.
It would be better to copy fields programmatically (by finding the slots
of the slot metaobject) than to do it manually.

Thanks,
Robert

From: Robert Monfera
Subject: Re: Slots of a slot definition metaobject
Date: 
Message-ID: <3820938F.13179029@fisec.com>
Robert Monfera wrote:

> I'm trying to get the list of effective slot definitions of 
> (subclasses of) slot definition metaobjects.
...
Being busy with AMOP-definitions, it just occurred to me that the ACL
and LW inspectors obviously use slot-value; now the only question is
whether it's possible to do it in a more platform-independent way.

Thanks
Robert
From: Robert Monfera
Subject: Re: Slots of a slot definition metaobject
Date: 
Message-ID: <3821119E.B4237B66@fisec.com>
I wrote:
> 
> I wrote:
> 
> > I'm trying to get the list of effective slot definitions of
> > (subclasses of) slot definition metaobjects.
> ...
> Being busy with AMOP-definitions, it just occurred to me that the ACL
> and LW inspectors obviously use slot-value; now the only question is
> whether it's possible to do it in a more platform-independent way.

I disagree that it's obvious - implementors may have used
clos:class-slots :-)

Just to generate some traffic, here's the answer to my question: of
course I need to use class-of to get to the _definition_ of the slot
metaobject first, which is a standard-class:

(clos:class-slots 
  (class-of 
    (make-instance 'clos:effective-slot-definition :name 'foo)))

(Again, it's not a snippet from my code, just a test case.)

It's as platform-independent as it can get.  Long live MOP!

Robert