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:
| allMethodsSent allMethodsImplemented |
allMethodsSent := IdentitySet new.
allMethodsImplemented := IdentitySet new.
(SystemOrganization listAtCategoryNamed: #'Collections-Arrayed')
do: [:eachClassName |
(Smalltalk at: eachClassName) methodDictionary valuesDo: [:eachMethod |
allMethodsSent addAll: eachMethod messages.
].
allMethodsImplemented addAll: (Smalltalk at: eachClassName) selectors
].
^allMethodsSent
removeAllFoundIn: allMethodsImplemented;
yourself
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
, and SystemOrganization
.
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:
MyUtilClass unimplementedMessageSendsFor: aCategorySymbol