added #hasExtensions
authorClaus Gittinger <cg@exept.de>
Sat, 19 Aug 2000 20:44:22 +0200
changeset 5545 1faf1228868d
parent 5544 9d107383caa3
child 5546 934ca7bfecc6
added #hasExtensions
Class.st
--- a/Class.st	Sat Aug 19 20:29:47 2000 +0200
+++ b/Class.st	Sat Aug 19 20:44:22 2000 +0200
@@ -3330,6 +3330,22 @@
 
 !Class methodsFor:'queries'!
 
+hasExtensions
+    "return true, if there are methods in the receiver, which belong to
+     a different package (i.e. package of class ~= package of method).
+     Those are class extensions, which must be treated specially when checking classes
+     into the sourceCode repository. (extensions are stored separate)" 
+
+    self allSelectorsAndMethodsDo:[:sel :mthd |
+        mthd package ~= package ifTrue:[^ true].
+    ].
+    ^ false
+
+    "
+     Smalltalk allClasses select:[:each | each hasExtensions] 
+    "
+!
+
 isClass
     "return true, if the receiver is some kind of class 
      (a real class, not just behavior);
@@ -4461,5 +4477,5 @@
 !Class class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.375 2000-08-11 17:38:27 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.376 2000-08-19 18:44:22 cg Exp $'
 ! !