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

stack at: 2返回当前方法的方法上下文。可以使用method消息检索当前方法的编译方法。我希望能够打印该方法的整个签名,例如:from:to:. 我查看了 MethodContext 和 CompiledMethod 类,但不知道该怎么做。

谢谢你。

4

1 回答 1

1

您可以使用该selector消息来检索CompiledMethod.

于 2010-05-12T07:39:15.827 回答