9 The Tracer

9.4 Tracing methods

You can also use the tracer to trace methods (primary and auxiliary) within a generic function. The following example shows how to specify any qualifiers and specializers.

CL-USER 18 > (in-package clos)
#<PACKAGE CLOS>

CLOS 19 > (defmethod foo (x)
            (print 'there))
#<STANDARD-METHOD FOO NIL (T) 72cc38>

CLOS 20 > (defmethod foo :before ((x integer))
            (print 'hello))
#<STANDARD-METHOD FOO (:BEFORE) (INTEGER) 7128d0>

CLOS 21 > (trace ((clos::method foo :before (integer))))
(METHOD FOO :BEFORE (INTEGER))

CLOS 22 > (foo 'x)

THERE 
THERE

CLOS 23 > (foo 1)
0 (METHOD FOO :BEFORE (INTEGER)) > (1)

HELLO 
0 (METHOD FOO :BEFORE (INTEGER)) < (HELLO)

THERE
THERE


FreeLisp User's Guide - 5 FEB 1996

Generated with Harlequin WebMaker