How to Retrieve Method's Signature in Squeak

Posted by Artium on Stack Overflow See other posts from Stack Overflow or by Artium
Published on 2010-05-12T07:20:59Z Indexed on 2010/05/12 7:24 UTC
Read the original article Hit count: 363

Filed under:
|
printThisMethodSig: aSomething
stack := thisContext stackOfSize: 2.
Transcript show: (stack at: 2); cr.

stack at: 2 returns the method context of the current method. It is possible to retrieve the compiled method of the current method using method message. I want to be able to print the whole signature of the method, for example: from:to:. I looked at both MethodContext and CompiledMethod classes but could not find out how to do it.

Thank you.

© Stack Overflow or respective owner

Related posts about squeak

Related posts about reflection