Using closer-mop, do the following:
- Collect direct slots
- For each parent, collect their slots
- For each collected slot, print it using
print-object, by inheritance order, most specific slots first
- If the slot is an object itself, it should be print hierarchically, with a proper indentation. That is, a tree of nested object should be print also as tree.
E.g:
(defclass foo ()
((slot-a :initarg :slot-a)
(slot-b :initarg :slot-b)))
(defclass bar (foo)
((slot-2nd-level :initarg :slot-2nd-level)))
(let ((a (make-instance 'bar :slot-a 12
:slot-b :ab
:slot-2nd-level (make-instance 'foo :slot-a 'a :slot-b 'b))))
(format t "~A~%" a))
#<BAR {1004972EC3}>
Slots:
SLOT-2ND-LEVEL (BAR): #<FOO {1004972E93}>
Slots:
SLOT-A (FOO): A
SLOT-B (FOO): B
SLOT-A (FOO): 12
SLOT-B (FOO): :AB
Using closer-mop, do the following:
print-object, by inheritance order, most specific slots firstE.g: