Plaster
New
List
Login
common-lisp
default
phoe
2022.02.07 20:17:29
(defclass foo-class (standard-class) (original-args)) (defmethod c2mop:validate-superclass ((c foo-class) (s standard-class)) t) (defmethod c2mop:validate-superclass ((c standard-class) (s foo-class)) t) (defclass no-initarg-slot-definition (c2mop:standard-effective-slot-definition) ()) (defclass trash-slot-definition (c2mop:standard-effective-slot-definition) ()) (defvar *direct-slot-definitions* '()) (defmethod c2mop:compute-effective-slot-definition ((class foo-class) name dslotds) (let ((*direct-slot-definitions* dslotds)) (call-next-method))) (defmethod c2mop:effective-slot-definition-class ((class foo-class) &rest initargs) (declare (ignore initargs)) (mapc #'describe *direct-slot-definitions*) (call-next-method)) C2CL-USER> (defclass foo () ((default-slot :allocation :instance) (trash-slot :allocation :trash) (no-initarg-slot)) (:metaclass foo-class)) #<FOO-CLASS CLOSER-COMMON-LISP-USER::FOO> C2CL-USER> (finalize-inheritance (find-class 'foo)) #<STANDARD-DIRECT-SLOT-DEFINITION CLOSER-COMMON-LISP-USER::DEFAULT-SLOT> [standard-object] Slots with :INSTANCE allocation: SOURCE = #S(SB-C:DEFINITION-SOURCE-LOCATION :NAMESTRING NIL :INDICES 0) NAME = DEFAULT-SLOT INITFORM = NIL INITFUNCTION = NIL INITARGS = NIL %TYPE = T %DOCUMENTATION = NIL %CLASS = #<FOO-CLASS CLOSER-COMMON-LISP-USER::FOO> READERS = NIL WRITERS = NIL ALLOCATION = :INSTANCE ALLOCATION-CLASS = NIL #<STANDARD-DIRECT-SLOT-DEFINITION CLOSER-COMMON-LISP-USER::TRASH-SLOT> [standard-object] Slots with :INSTANCE allocation: SOURCE = #S(SB-C:DEFINITION-SOURCE-LOCATION :NAMESTRING NIL :INDICES 0) NAME = TRASH-SLOT INITFORM = NIL INITFUNCTION = NIL INITARGS = NIL %TYPE = T %DOCUMENTATION = NIL %CLASS = #<FOO-CLASS CLOSER-COMMON-LISP-USER::FOO> READERS = NIL WRITERS = NIL ALLOCATION = :TRASH ALLOCATION-CLASS = NIL #<STANDARD-DIRECT-SLOT-DEFINITION CLOSER-COMMON-LISP-USER::NO-INITARG-.. [standard-object] Slots with :INSTANCE allocation: SOURCE = #S(SB-C:DEFINITION-SOURCE-LOCATION :NAMESTRING NIL :INDICES 0) NAME = NO-INITARG-SLOT INITFORM = NIL INITFUNCTION = NIL INITARGS = NIL %TYPE = T %DOCUMENTATION = NIL %CLASS = #<FOO-CLASS CLOSER-COMMON-LISP-USER::FOO> READERS = NIL WRITERS = NIL ALLOCATION = :INSTANCE ALLOCATION-CLASS = NIL NIL
Raw
Annotate
Repaste