classVarNames
is a method that returns a collection of the class variable names.
For example, if you'll add this method to Behavior class you should get a functionality you're asking for:
superclassesHaveNoClassVar: name
^ self allSuperclasses noneSatisfy: [:class |
class classVarNames includes: name]
Nothing special. Just take allSuperclasses
and check if none of them includes
a desired variable name
among it's classVarNames
.