Class.st
changeset 4575 aa220bf73713
parent 4495 4804e3e33d76
child 4578 705211312d94
equal deleted inserted replaced
4574:bcd0132b8d49 4575:aa220bf73713
   808      An empty collection if there are none.
   808      An empty collection if there are none.
   809      The classes are in any order."
   809      The classes are in any order."
   810 
   810 
   811     |classes myName myNamePrefix myNamePrefixLen|
   811     |classes myName myNamePrefix myNamePrefixLen|
   812 
   812 
   813     classes := IdentitySet new.
   813     classes := IdentitySet new:10.
   814     myName := self name.
   814     myName := self name.
   815     myNamePrefix := myName , '::'.
   815     myNamePrefix := myName , '::'.
   816     myNamePrefixLen := myNamePrefix size.
   816     myNamePrefixLen := myNamePrefix size.
   817 
   817 
   818     Smalltalk allBehaviorsDo:[:aClass |
   818     Smalltalk keysDo:[:nm |
   819         |nm owner|
   819         |cls|
   820 
   820 
   821         aClass isBehavior ifTrue:[
   821         (nm startsWith:myNamePrefix) ifTrue:[
   822             aClass isMeta ifFalse:[
   822             (allOfThem
   823 "/                (owner := aClass owningClass) notNil ifTrue:[
   823             or:[(nm indexOf:$: startingAt:myNamePrefixLen + 1) == 0]) ifTrue:[
   824                     nm := aClass name.
   824                 cls := Smalltalk at:nm.
   825                     (nm startsWith:myNamePrefix) ifTrue:[
   825 
   826                         "/ ignore private-privateClasses if not allOfThem
   826                 (cls isBehavior and:[cls isMeta not]) ifTrue:[
   827                         (allOfThem
   827                     classes add:cls.
   828                         or:[(nm indexOf:$: startingAt:myNamePrefixLen + 1) == 0]) ifTrue:[
       
   829                             "/ care for obsolete privateClasses
       
   830                             (Smalltalk at:nm) == aClass ifFalse:[
       
   831                                 Transcript showCR:'skipped leftover (obsolete) private class: ' , nm.
       
   832                             ] ifTrue:[
       
   833                                 classes add:aClass.
       
   834                             ].
       
   835                         ]
       
   836 "/                    ]
       
   837                 ]
   828                 ]
   838             ]
   829             ]
   839         ]
   830         ]
   840     ].
   831     ].
       
   832 
   841     ^ classes
   833     ^ classes
   842 
   834 
   843     "
   835     "
   844      UILayoutTool privateClassesOrAll:true 
   836      UILayoutTool privateClassesOrAll:true 
   845      UILayoutTool privateClassesOrAll:false 
   837      UILayoutTool privateClassesOrAll:false 
  3929 ! !
  3921 ! !
  3930 
  3922 
  3931 !Class class methodsFor:'documentation'!
  3923 !Class class methodsFor:'documentation'!
  3932 
  3924 
  3933 version
  3925 version
  3934     ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.342 1999-08-02 16:05:28 cg Exp $'
  3926     ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.343 1999-08-05 13:00:33 cg Exp $'
  3935 ! !
  3927 ! !