[comp.sys.next] function which returns a list of object's methods

stefan@lbl-csam.arpa (Stefan gottschalk) (10/04/89)

I am interested in finding (or writing myself) a method which will return
a list of an object's known methods.  I know about the respondsTo:
method, which allows one to ask whether the queried object has a
*particular* method, which takes a method as a parameter and returns
a boolean indicating whether the object knows the method.  I also know
about the run-time functions in "Chapter 23: C Functions" in the NeXT online
documentation.

The function objc_getClasses() returns a table of the classes
present in the "executable image", which resembles what I need.  I have
in mind a function called (for example) objc_getMethods(), where you pass in 
an object and get back a table of strings or selectors.  Does anyone know if
such a function exists, and if not, how such a function could be built from
the existing libraries?

I intend to append the method to the Object class (via categories).  The idea
is to put all the work into this method, so that I won't have to think about it
as I design new classes (they should simply inherit the ability to return
message lists).

I would appreciate any ideas at all.  Thanks in advance!

Stefan Gottschalk (stefan@csam.lbl.gov)