WrappedMethod.st
changeset 14 530bf06f9c78
parent 10 676ce0471de4
child 16 fcbfbba03d49
equal deleted inserted replaced
13:e416e7aa11e1 14:530bf06f9c78
     1 "
     1 "
     2  COPYRIGHT (c) 1994 by Claus Gittinger
     2  COPYRIGHT (c) 1994 by Claus Gittinger
     3               All Rights Reserved
     3 	      All Rights Reserved
     4 
     4 
     5  This software is furnished under a license and may be used
     5  This software is furnished under a license and may be used
     6  only in accordance with the terms of that license and with the
     6  only in accordance with the terms of that license and with the
     7  inclusion of the above copyright notice.   This software may not
     7  inclusion of the above copyright notice.   This software may not
     8  be provided or otherwise made available to, or used by, any
     8  be provided or otherwise made available to, or used by, any
    17 	 category:'Kernel-Methods'
    17 	 category:'Kernel-Methods'
    18 !
    18 !
    19 
    19 
    20 WrappedMethod comment:'
    20 WrappedMethod comment:'
    21 COPYRIGHT (c) 1994 by Claus Gittinger
    21 COPYRIGHT (c) 1994 by Claus Gittinger
    22               All Rights Reserved
    22 	      All Rights Reserved
    23 
    23 
    24 $Header: /cvs/stx/stx/libbasic3/WrappedMethod.st,v 1.3 1994-08-05 01:07:58 claus Exp $
    24 $Header: /cvs/stx/stx/libbasic3/WrappedMethod.st,v 1.4 1994-11-28 20:57:03 claus Exp $
    25 '!
    25 '!
    26 
    26 
    27 !WrappedMethod class methodsFor:'documentation'!
    27 !WrappedMethod class methodsFor:'documentation'!
    28 
    28 
    29 copyright
    29 copyright
    30 "
    30 "
    31  COPYRIGHT (c) 1994 by Claus Gittinger
    31  COPYRIGHT (c) 1994 by Claus Gittinger
    32               All Rights Reserved
    32 	      All Rights Reserved
    33 
    33 
    34  This software is furnished under a license and may be used
    34  This software is furnished under a license and may be used
    35  only in accordance with the terms of that license and with the
    35  only in accordance with the terms of that license and with the
    36  inclusion of the above copyright notice.   This software may not
    36  inclusion of the above copyright notice.   This software may not
    37  be provided or otherwise made available to, or used by, any
    37  be provided or otherwise made available to, or used by, any
    40 "
    40 "
    41 !
    41 !
    42 
    42 
    43 version
    43 version
    44 "
    44 "
    45 $Header: /cvs/stx/stx/libbasic3/WrappedMethod.st,v 1.3 1994-08-05 01:07:58 claus Exp $
    45 $Header: /cvs/stx/stx/libbasic3/WrappedMethod.st,v 1.4 1994-11-28 20:57:03 claus Exp $
    46 "
    46 "
    47 !
    47 !
    48 
    48 
    49 documentation
    49 documentation
    50 "
    50 "
    53 ! !
    53 ! !
    54 
    54 
    55 !WrappedMethod methodsFor:'queries'!
    55 !WrappedMethod methodsFor:'queries'!
    56 
    56 
    57 isWrapped
    57 isWrapped
       
    58     "return true, if the receiver is a wrapped method.
       
    59      True is returned here, since the receiver is always a wrapped one"
       
    60 
    58     ^ true
    61     ^ true
    59 ! !
    62 ! !
    60 
    63 
    61 !WrappedMethod methodsFor:'accessing'!
    64 !WrappedMethod methodsFor:'accessing'!
    62 
    65 
    63 originalMethod
    66 originalMethod
    64     "return the method I am wrapping"
    67     "return the method the receiver is wrapping"
    65 
    68 
    66     "a kludge: it must be in the literal array somewhere"
    69     "a kludge: it must be in the literal array somewhere"
    67     literals do:[:aLiteral |
    70     literals do:[:aLiteral |
    68         aLiteral class == Method ifTrue:[
    71 	aLiteral class == Method ifTrue:[
    69             ^ aLiteral
    72 	    ^ aLiteral
    70         ]
    73 	]
    71     ].
    74     ].
    72     ^ nil
    75     ^ nil
    73 !
    76 !
    74 
    77 
    75 basicLiterals
    78 basicLiterals
    76     "return my literals"
    79     "return my literals"
    77 
    80 
    78     ^ literals
    81     ^ literals
    79 !
       
    80 
       
    81 methodArgAndVarNames
       
    82     ^ self originalMethod methodArgAndVarNames
       
    83 !
    82 !
    84 
    83 
    85 source
    84 source
    86     "return the wrapped methods source"
    85     "return the wrapped methods source"
    87 
    86 
    93 
    92 
    94     ^ self originalMethod literals
    93     ^ self originalMethod literals
    95 !
    94 !
    96 
    95 
    97 numberOfMethodVars
    96 numberOfMethodVars
       
    97     "return the number of locals in the wrapped method."
       
    98 
    98     ^ self originalMethod numberOfMethodVars 
    99     ^ self originalMethod numberOfMethodVars 
    99 !
   100 !
   100 
   101 
   101 methodVarNames
   102 methodVarNames
       
   103     "return the names of the locals of the wrapped method."
       
   104 
   102     ^ self originalMethod methodVarNames 
   105     ^ self originalMethod methodVarNames 
       
   106 !
       
   107 
       
   108 methodArgAndVarNames
       
   109     "return the names of the args and locals of the wrapped method."
       
   110 
       
   111     ^ self originalMethod methodArgAndVarNames
   103 ! !
   112 ! !
   104 
   113