Method.st
changeset 414 be4ea3cf7748
parent 400 1754d8edcce4
child 415 e6ef421822d4
equal deleted inserted replaced
413:e5a7deafe8bd 414:be4ea3cf7748
    21 
    21 
    22 Method comment:'
    22 Method comment:'
    23 COPYRIGHT (c) 1989 by Claus Gittinger
    23 COPYRIGHT (c) 1989 by Claus Gittinger
    24 	     All Rights Reserved
    24 	     All Rights Reserved
    25 
    25 
    26 $Header: /cvs/stx/stx/libbasic/Method.st,v 1.44 1995-08-17 16:05:23 claus Exp $
    26 $Header: /cvs/stx/stx/libbasic/Method.st,v 1.45 1995-08-27 23:20:46 claus Exp $
    27 '!
    27 '!
    28 
    28 
    29 !Method class methodsFor:'documentation'!
    29 !Method class methodsFor:'documentation'!
    30 
    30 
    31 copyright
    31 copyright
    42 "
    42 "
    43 !
    43 !
    44 
    44 
    45 version
    45 version
    46 "
    46 "
    47 $Header: /cvs/stx/stx/libbasic/Method.st,v 1.44 1995-08-17 16:05:23 claus Exp $
    47 $Header: /cvs/stx/stx/libbasic/Method.st,v 1.45 1995-08-27 23:20:46 claus Exp $
    48 "
    48 "
    49 !
    49 !
    50 
    50 
    51 documentation
    51 documentation
    52 "
    52 "
   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