#REFACTORING by cg
authorClaus Gittinger <cg@exept.de>
Mon, 17 Jul 2017 12:19:56 +0200
changeset 22027 2835965d3bef
parent 22026 ec5d6fa4fb2c
child 22028 b3ec28d8cab9
#REFACTORING by cg class: Behavior added: #privateClassesDo: moved (to ClassDescription and Class): #addAllPrivateClassesTo: #classComment:stamp: #initializeWithAllPrivateClasses #shortName
Behavior.st
--- a/Behavior.st	Mon Jul 17 12:19:35 2017 +0200
+++ b/Behavior.st	Mon Jul 17 12:19:56 2017 +0200
@@ -1291,10 +1291,6 @@
 
 !Behavior methodsFor:'Compatibility-Squeak'!
 
-classComment:comment stamp:commentStamp
-    self comment:comment
-!
-
 classSide
     <resource: #obsolete>
 
@@ -1442,12 +1438,9 @@
 
     ^ self theNonMetaclass
 
-!
-
-shortName
-    ^ self nameWithoutPrefix
 ! !
 
+
 !Behavior methodsFor:'RefactoringBrowser'!
 
 realClass
@@ -2249,6 +2242,17 @@
     "Modified (comment): / 10-02-2017 / 10:31:17 / cg"
 !
 
+privateClassesDo:aBlock
+    "evaluate aBlock on all of my (immediate) private classes (if any).
+     Evaluation is in no particular order."
+
+    "/ I have no private class - only Class has."
+    "/ Intentionally left blank
+    ^ self
+
+    "Created: / 17-07-2017 / 10:19:19 / cg"
+!
+
 selectorsAndMethodsDo:aTwoArgBlock
     "evaluate the argument, aBlock for all my selectors,
      passing the corresponding method as second argument.
@@ -2361,24 +2365,6 @@
     ^ self
 !
 
-initializeWithAllPrivateClasses
-    "if implemented, send #initialize to myself and any private
-     class which does so.
-     This is sent to a class after it
-     has been loaded into the system.
-     Statically compiled classes are initialized by the VM"
-
-    (self class includesSelector:#initialize) ifTrue:[
-	self initialize.
-    ].
-    self privateClassesSorted do:[:aPrivateClass |
-	aPrivateClass initializeWithAllPrivateClasses.
-    ].
-
-    "Created: / 13.5.1998 / 23:33:16 / cg"
-    "Modified: / 13.5.1998 / 23:34:06 / cg"
-!
-
 postAutoload
     "postAutoload is sent to a class after it has been autoloaded.
      This gives it a chance to arrange for automatic unloading to be done
@@ -3398,15 +3384,6 @@
     "
 !
 
-addAllPrivateClassesTo:aCollection
-    "add all of my private classes to aCollection"
-
-    self privateClassesDo:[:aPrivateClass |
-	aCollection add:aPrivateClass.
-	aPrivateClass addAllPrivateClassesTo:aCollection
-    ].
-!
-
 getLookupObject
     "return the lookupObject (Jan's MetaObjectProtocol support) or nil.
      If non-nil, no lookup is performed by the VM, instead the lookupObject