312 |
312 |
313 "protect myself a bit - putting in an object would crash me ..." |
313 "protect myself a bit - putting in an object would crash me ..." |
314 (newFlags isMemberOf:SmallInteger) ifTrue:[ |
314 (newFlags isMemberOf:SmallInteger) ifTrue:[ |
315 flags := newFlags |
315 flags := newFlags |
316 ] |
316 ] |
|
317 ! |
|
318 |
|
319 privacy |
|
320 "return a symbol describing the methods access rights (privacy); |
|
321 Currently, this is one of #private, #protected and #public. |
|
322 Notice: method privacy is a nonstandard feature, not supported |
|
323 by other smalltalk implementations and not specified in the ANSI spec. |
|
324 This is EXPERIMENTAL - and being evaluated for usability. |
|
325 It may change or even vanish (if it shows to be not useful)." |
|
326 |
|
327 self isPrivate ifTrue:[^ #private]. |
|
328 self isProtected ifTrue:[^ #protected]. |
|
329 ^ #public |
|
330 |
|
331 "Modified: 27.8.1995 / 22:53:31 / claus" |
|
332 ! |
|
333 |
|
334 privacy:aSymbol |
|
335 "set the methods access rights (privacy) from a symbol; |
|
336 Currently, this must be one of #private, #protected and #public. |
|
337 Notice: method privacy is a nonstandard feature, not supported |
|
338 by other smalltalk implementations and not specified in the ANSI spec. |
|
339 This is EXPERIMENTAL - and being evaluated for usability. |
|
340 It may change or even vanish (if it shows to be not useful)." |
|
341 |
|
342 aSymbol == #private ifTrue:[^ self setToPrivate]. |
|
343 aSymbol == #protected ifTrue:[^ self setToProtected]. |
|
344 self setToPublic |
|
345 |
|
346 "Modified: 27.8.1995 / 22:58:08 / claus" |
317 ! |
347 ! |
318 |
348 |
319 setToPrivate |
349 setToPrivate |
320 "set the flag bit stating that this method is private. |
350 "set the flag bit stating that this method is private. |
321 Execution of the receiver will only be allowed for self/super-sends from |
351 Execution of the receiver will only be allowed for self/super-sends from |