You can use allSuperclasses
method to get all ancestors. For example:
Integer allSuperclasses
will return
an OrderedCollection(Number Magnitude Object ProtoObject)
Then you can use allSatisfy: aBlock
to see if they don't have this method.
I think that your code will look like this then:
manualSet: aSet
| validatedSet |
( aSet == nil ) ifTrue: [ manualSet:= nil ]
ifFalse: [
(aSet isMemberOf: Set) ifFalse:[^nil].
validatedSet:= aSet select:[ :each|
(each isMemberOf:Symbol)
and:(self respondsTo:each)
and:(self isManual:each in: self)
and:(self allSuperclasses allSatisfy: [:class |
(self isManual:each in:class) not])].
manualSet:= validatedSet.
]