Behavior.st
changeset 24479 2b01fef43f16
parent 24273 54d3e4370077
child 24505 d6fd2fc59509
equal deleted inserted replaced
24478:5138e2ba3e6c 24479:2b01fef43f16
     1 "{ Encoding: utf8 }"
       
     2 
       
     3 "
     1 "
     4  COPYRIGHT (c) 1988 by Claus Gittinger
     2  COPYRIGHT (c) 1988 by Claus Gittinger
     5 	      All Rights Reserved
     3 	      All Rights Reserved
     6 
     4 
     7  This software is furnished under a license and may be used
     5  This software is furnished under a license and may be used
  1329 !
  1327 !
  1330 
  1328 
  1331 selectorsWithArgs:numberOfArgs
  1329 selectorsWithArgs:numberOfArgs
  1332     "Return all selectors defined in this class that take this number of arguments."
  1330     "Return all selectors defined in this class that take this number of arguments."
  1333 
  1331 
  1334     ^ self selectors
  1332     |selectors|
  1335 	select:[:sel | sel argumentCount == numberOfArgs]
  1333 
  1336 
  1334     selectors := OrderedCollection new.
  1337     "
  1335     (self methodDictionary ? #()) keysDo:[:sel |
  1338      SmallInteger selectorsWithArgs:0
  1336         sel argumentCount == numberOfArgs ifTrue:[
  1339      SmallInteger selectorsWithArgs:2
  1337             selectors add:sel
  1340      SmallInteger selectorsWithArgs:3
  1338         ]
       
  1339     ].
       
  1340     ^ selectors
       
  1341 "/    ^ self selectors
       
  1342 "/        select:[:sel | sel argumentCount == numberOfArgs]
       
  1343 
       
  1344     "
       
  1345      SmallInteger selectorsWithArgs:0  
       
  1346      SmallInteger selectorsWithArgs:1  
       
  1347      SmallInteger selectorsWithArgs:2  
       
  1348      SmallInteger selectorsWithArgs:3  
  1341      SmallInteger selectorsWithArgs:4
  1349      SmallInteger selectorsWithArgs:4
  1342     "
  1350     "
  1343 !
  1351 !
  1344 
  1352 
  1345 theMetaClass
  1353 theMetaClass