--- a/Method.st Tue Nov 08 15:59:44 2011 +0100
+++ b/Method.st Fri Nov 18 17:05:20 2011 +0100
@@ -431,8 +431,8 @@
| index |
index := self annotationIndexOf: key.
- index ifNil:[^nil].
- ^self annotationAtIndex: index.
+ index isNil ifTrue:[^ nil].
+ ^ self annotationAtIndex: index.
"
(Object >> #yourself) annotationAt: #namespace:
@@ -440,18 +440,20 @@
"Created: / 19-05-2010 / 16:16:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified: / 02-07-2010 / 22:35:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 18-11-2011 / 14:46:21 / cg"
!
annotations
"Returns annotations"
- annotations ifNil:[^#()].
+ annotations isNil ifTrue:[^#()].
"iterate over annotation array to
trigger lazy-loading"
self annotationsDo:[:ignored].
^ annotations
"Modified: / 11-07-2010 / 19:25:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 18-11-2011 / 14:46:56 / cg"
!
annotations: anObject
@@ -512,12 +514,14 @@
annotationsDo: aBlock
- annotations ifNil:[^nil].
- 1 to: annotations size do:
- [:i|aBlock value: (self annotationAtIndex: i)].
+ annotations isNil ifTrue:[^nil].
+ 1 to: annotations size do: [:i|
+ aBlock value: (self annotationAtIndex: i)
+ ].
"Created: / 02-07-2010 / 22:33:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified: / 11-07-2010 / 19:38:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified (format): / 18-11-2011 / 14:47:06 / cg"
!
category
@@ -604,9 +608,10 @@
lookupObject
- ^lookupObject ifNil:[Lookup builtin].
+ ^lookupObject isNil ifTrue:[Lookup builtin].
"Created: / 28-04-2010 / 18:36:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 18-11-2011 / 14:47:12 / cg"
!
lookupObject: anObject
@@ -698,26 +703,27 @@
!
overriddenMethod
-
"Answers overridden method or nil."
- Overrides ifNil:[^nil].
- ^(Overrides includesKey: self)
+ Overrides isNil ifTrue:[^ nil].
+ ^ (Overrides includesKey: self)
ifTrue:[Overrides at: self]
"Created: / 17-06-2009 / 19:09:58 / Jan Vrany <vranyj1@fel.cvut.cz>"
+ "Modified (format): / 18-11-2011 / 14:48:07 / cg"
!
overriddenMethod: aMethod
"Set overridden method to aMethod"
- Overrides ifNil:[Overrides := WeakIdentityDictionary new:10].
- aMethod ifNotNil:[aMethod makeLocalStringSource].
+ Overrides isNil ifTrue:[Overrides := WeakIdentityDictionary new:10].
+ aMethod notNil ifTrue:[aMethod makeLocalStringSource].
Overrides at: self put: aMethod
"Created: / 17-06-2009 / 19:09:17 / Jan Vrany <vranyj1@fel.cvut.cz>"
"Modified: / 22-08-2009 / 10:47:42 / Jan Vrany <vranyj1@fel.cvut.cz>"
+ "Modified: / 18-11-2011 / 14:48:26 / cg"
!
package
@@ -1891,7 +1897,7 @@
| annotationOrArray annotation args |
- annotations ifNil:[^nil].
+ annotations isNil ifTrue:[^nil].
annotationOrArray := annotation := annotations at: index.
annotationOrArray isArray ifTrue:[
args := annotationOrArray size == 2
@@ -1911,8 +1917,7 @@
"Created: / 02-07-2010 / 22:30:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified: / 11-07-2010 / 19:39:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 09-09-2011 / 05:00:52 / cg"
- "Modified (format): / 12-09-2011 / 09:34:48 / cg"
+ "Modified: / 18-11-2011 / 14:46:27 / cg"
!
annotationIndexOf: key
@@ -1920,17 +1925,18 @@
"Returns index of annotation with given key
or nil if there is no such annotation"
- annotations ifNil:[^nil].
-
- annotations keysAndValuesDo:
- [:index :annotationOrArray|
+ annotations isNil ifTrue:[^nil].
+
+ annotations keysAndValuesDo: [:index :annotationOrArray|
annotationOrArray isArray
ifTrue: [annotationOrArray first == key ifTrue:[^index]]
- ifFalse:[annotationOrArray key == key ifTrue:[^index]]].
+ ifFalse:[annotationOrArray key == key ifTrue:[^index]]
+ ].
^nil.
"Created: / 19-05-2010 / 16:40:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified: / 11-07-2010 / 19:23:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified (format): / 18-11-2011 / 14:46:45 / cg"
!
cacheSourceStream:aStream
@@ -3065,16 +3071,18 @@
"return the methods resource spec; either nil or a collection of symbols."
| resources |
+
self hasResource ifFalse:[^ nil].
- annotations ifNil:[^ self parseResources].
+ annotations isNil ifTrue:[^ self parseResources].
resources := IdentityDictionary new.
- self annotationsAt: #resource: orAt: #resource:value: do:
- [:annot|
- resources at: annot type put: annot value ? true].
- ^resources
+ self annotationsAt: #resource: orAt: #resource:value: do:[:annot|
+ resources at: annot type put: annot value ? true
+ ].
+ ^ resources
"Modified: / 16-07-2010 / 11:49:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 18-11-2011 / 14:48:41 / cg"
!
selector
@@ -3583,11 +3591,11 @@
!Method class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Method.st,v 1.378 2011-10-30 10:05:02 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Method.st,v 1.379 2011-11-18 16:05:20 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/Method.st,v 1.378 2011-10-30 10:05:02 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Method.st,v 1.379 2011-11-18 16:05:20 cg Exp $'
!
version_SVN