Dear List,
I was looking for a way to test whether a class is abstract or not.
One easy way, is to check whether the class sends the message
subclassResponsibility. This is not perfect, since we should also
check whether the receiver is 'self' and this is the only statement in
the method body. Looking at sender of #subclassResponsibiliy did not
reveal anything. I propose to define the following method:
Behavior>>isAbstract
^ self methods anySatisfy: [:cm | cm sendsSelector:
#subclassResponsibility ]
Shall I can create an issue and add a changeset?
Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project