How to Retrieve Method's Signature in Squeak
- by Artium
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.