Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 smalltalk - 我需要检查是否objectA有所有objectB具有 .
objectA
objectB
我需要编写自己的代码,怎么办?
例如,您可以询问对象的类,它的实例可以理解哪些选择器:
objectA class allSelectors
然后你可以询问不同的对象并比较结果。
解决方案可能是
objectA class allSelectors includesAll: objectB class allSelectors