Pharo 和 Squeak Smalltalk:列出包中未实现的方法?
如何列出包中所有未实现的方法?鉴于该方法应该在该包中实现,而不是在其他包中实现(例如在包外的超类中或在 Object 中)。
编辑:是的,我想知道“发送的未实现的消息”,但将分析限制为一个特定的给定包,例如:
FooPackage unimplementedMessageSends。
How do I list all unimplemented methods in a package? Given that the method should be implemented in that package and not in other (for example in a superclass outside the package or in Object).
Edit: Yes, I'd like to know "messages sent that are not implemented" but to limit the analysis to one specific given package, for ex:
FooPackage unimplementedMessageSends.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我还没有对此进行全面测试,因此您可能需要对其进行一些调整以满足您的要求,但从我对您问题的理解来看,您可能会遇到这样的事情:
希望这至少可以帮助您开始,如果您需要调整它,看看类
Behavior
(看看你可以使用什么,而不是改变它!),CompiledMethod
和SystemOrganization.
显然这个例子使用了类别(我假设这就是你所说的包的意思?)“Collections-Arrayed”,但是你当然可以调整它以使其成为方法参数,例如:
I haven't fully tested this so you might need to tweak it a bit to suit your requirements, but from how I understand your question, you might be after something like this:
Hopefully that'll help you get started at least, if you need to tweak it, have a look at the classes
Behavior
(to see what you can use, not to change it!),CompiledMethod
, andSystemOrganization
.Obviously this example uses the category (I'm assuming that's what you mean by package?) "Collections-Arrayed", but you could of course adapt it to make that a method parameter, something like: