Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defun method-info (m)(list (METHOD-QUALIFIERS m)(MOP:METHOD-LAMBDA-LIST m)(MOP:METHOD-SPECIALIZERS m)(MOP:METHOD-FUNCTION m)))
- (defun print_whatnot (b)(let ((*package* (find-package :keyword)))(print b)))
- (defun print-trip (str a b)(unless (eq a b)(print_whatnot (list str a b))))
- (defun print-subclasses (root &optional pre-print) (let ((class (typecase root (class root) (symbol (find-class root)) (t (class-of root)))))
- (dolist (item (mapcar #'MOP:slot-definition-name (MOP:class-direct-slots class)))(print-trip "slot" (class-name class) item))
- (dolist (item (mapcar #'class-name (MOP:class-direct-superclasses class)))(print-trip "subclass" item (class-name class)))
- (print-trip "precedance" (class-name class) (mapcar #'class-name (cdr (MOP:class-precedence-list class))))
- (when pre-print (print-trip "subclass" (class-name pre-print) (class-name class)))
- (dolist (item (mapcar #'method-info (MOP:class-direct-methods class))) (print-trip "method" (class-name class) item ))
- (dolist (item (MOP:class-direct-subclasses class))
- (print-subclasses item class))))
- (print-subclasses t)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement