WrappedMethod.st
changeset 4392 40dcd434117c
parent 4213 30d0d0045710
child 4431 1d539eece6b9
equal deleted inserted replaced
4391:dbe95897a832 4392:40dcd434117c
   341     "Created: / 01-07-2011 / 10:03:32 / cg"
   341     "Created: / 01-07-2011 / 10:03:32 / cg"
   342 ! !
   342 ! !
   343 
   343 
   344 !WrappedMethod methodsFor:'printing & storing'!
   344 !WrappedMethod methodsFor:'printing & storing'!
   345 
   345 
       
   346 printOn:aStream
       
   347     "put a printed representation of the receiver onto aStream.
       
   348      Since methods do not store their class/selector, we have to search
       
   349      for it here."
       
   350 
       
   351     self basicPrintOn:aStream."/ aStream nextPutAll:(self classNameWithArticle).
       
   352     aStream nextPutAll:'(for '.
       
   353     aStream nextPutAll:self originalMethod whoString.
       
   354     aStream nextPutAll:')'.
       
   355 !
       
   356 
   346 selectorPrintStringInBrowserFor:selector
   357 selectorPrintStringInBrowserFor:selector
   347     ^ [
   358     ^ [
   348         self originalMethod perform:  #selectorPrintStringInBrowserFor: with: selector
   359         self originalMethod perform:  #selectorPrintStringInBrowserFor: with: selector
   349     ] on: Object messageNotUnderstoodSignal do:[
   360     ] on: Object messageNotUnderstoodSignal do:[
   350         super selectorPrintStringInBrowserFor:selector
   361         super selectorPrintStringInBrowserFor:selector
   361     ].
   372     ].
   362 
   373 
   363     "Created: / 16-10-2013 / 01:04:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   374     "Created: / 16-10-2013 / 01:04:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   364 ! !
   375 ! !
   365 
   376 
   366 !WrappedMethod methodsFor:'printing and storing'!
       
   367 
       
   368 printOn:aStream
       
   369     "put a printed representation of the receiver onto aStream.
       
   370      Since methods do not store their class/selector, we have to search
       
   371      for it here."
       
   372 
       
   373     self basicPrintOn:aStream."/ aStream nextPutAll:(self classNameWithArticle).
       
   374     aStream nextPutAll:'(for '.
       
   375     aStream nextPutAll:self originalMethod whoString.
       
   376     aStream nextPutAll:')'.
       
   377 ! !
       
   378 
       
   379 !WrappedMethod methodsFor:'private'!
   377 !WrappedMethod methodsFor:'private'!
   380 
   378 
   381 annotationAtIndex: index
   379 annotationAtIndex: index
   382     "return annotation at given index.
   380     "return annotation at given index.
   383      any raw annotation array is lazily initialized"
   381      any raw annotation array is lazily initialized"