equal
deleted
inserted
replaced
108 |
108 |
109 "Created: 3.1.1997 / 15:05:48 / cg" |
109 "Created: 3.1.1997 / 15:05:48 / cg" |
110 "Modified: 3.1.1997 / 15:06:15 / cg" |
110 "Modified: 3.1.1997 / 15:06:15 / cg" |
111 ! ! |
111 ! ! |
112 |
112 |
113 |
|
114 !UndefinedObject class methodsFor:'queries'! |
113 !UndefinedObject class methodsFor:'queries'! |
115 |
114 |
116 canBeSubclassed |
115 canBeSubclassed |
117 "return true if it is allowed to create subclasses of the receiver. |
116 "return true if it is allowed to create subclasses of the receiver. |
118 Return false here - since it is NOT possible for UndefinedObject. |
117 Return false here - since it is NOT possible for UndefinedObject. |
152 |
151 |
153 ^ self == UndefinedObject |
152 ^ self == UndefinedObject |
154 ! ! |
153 ! ! |
155 |
154 |
156 |
155 |
157 |
|
158 |
|
159 !UndefinedObject methodsFor:'converting'! |
156 !UndefinedObject methodsFor:'converting'! |
160 |
157 |
161 asBoolean |
158 asBoolean |
162 ^ false |
159 ^ false |
163 ! |
160 ! |
212 - since there is only one nil in the system return self" |
209 - since there is only one nil in the system return self" |
213 |
210 |
214 ^ self |
211 ^ self |
215 ! ! |
212 ! ! |
216 |
213 |
|
214 !UndefinedObject methodsFor:'debugging'! |
|
215 |
|
216 haltIfNil |
|
217 "halt if the receiver is nil" |
|
218 |
|
219 <resource: #skipInDebuggersWalkBack> |
|
220 |
|
221 self halt:'nil encountered' |
|
222 |
|
223 " |
|
224 3 haltIfNil |
|
225 nil haltIfNil |
|
226 " |
|
227 |
|
228 "Created: / 17-07-2017 / 10:52:36 / cg" |
|
229 ! ! |
|
230 |
217 !UndefinedObject methodsFor:'dependents access'! |
231 !UndefinedObject methodsFor:'dependents access'! |
218 |
232 |
219 addDependent:someObject |
233 addDependent:someObject |
220 "raise an error here - nil may not have dependents (it never changes anyway)" |
234 "raise an error here - nil may not have dependents (it never changes anyway)" |
221 |
235 |
304 |
318 |
305 ^ 0 |
319 ^ 0 |
306 |
320 |
307 "Modified (comment): / 17-05-2017 / 16:37:19 / mawalch" |
321 "Modified (comment): / 17-05-2017 / 16:37:19 / mawalch" |
308 ! ! |
322 ! ! |
309 |
|
310 |
323 |
311 !UndefinedObject methodsFor:'subclass creation'! |
324 !UndefinedObject methodsFor:'subclass creation'! |
312 |
325 |
313 nilSubclass:action |
326 nilSubclass:action |
314 "common helper for subclass creation. |
327 "common helper for subclass creation. |
739 "dispatch for visitor pattern; send #visitNil:with: to aVisitor." |
752 "dispatch for visitor pattern; send #visitNil:with: to aVisitor." |
740 |
753 |
741 ^ aVisitor visitNilWith:aParameter |
754 ^ aVisitor visitNilWith:aParameter |
742 ! ! |
755 ! ! |
743 |
756 |
744 |
|
745 !UndefinedObject class methodsFor:'documentation'! |
757 !UndefinedObject class methodsFor:'documentation'! |
746 |
758 |
747 version |
759 version |
748 ^ '$Header$' |
760 ^ '$Header$' |
749 ! |
761 ! |