9
|
1 |
"
|
|
2 |
COPYRIGHT (c) 1994 by Claus Gittinger
|
14
|
3 |
All Rights Reserved
|
9
|
4 |
|
|
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
|
|
7 |
inclusion of the above copyright notice. This software may not
|
|
8 |
be provided or otherwise made available to, or used by, any
|
|
9 |
other person. No title to or ownership of the software is
|
|
10 |
hereby transferred.
|
|
11 |
"
|
8
|
12 |
|
|
13 |
Method subclass:#WrappedMethod
|
|
14 |
instanceVariableNames:''
|
|
15 |
classVariableNames:''
|
|
16 |
poolDictionaries:''
|
|
17 |
category:'Kernel-Methods'
|
|
18 |
!
|
|
19 |
|
9
|
20 |
WrappedMethod comment:'
|
|
21 |
COPYRIGHT (c) 1994 by Claus Gittinger
|
14
|
22 |
All Rights Reserved
|
9
|
23 |
|
14
|
24 |
$Header: /cvs/stx/stx/libbasic3/WrappedMethod.st,v 1.4 1994-11-28 20:57:03 claus Exp $
|
9
|
25 |
'!
|
|
26 |
|
|
27 |
!WrappedMethod class methodsFor:'documentation'!
|
|
28 |
|
|
29 |
copyright
|
|
30 |
"
|
|
31 |
COPYRIGHT (c) 1994 by Claus Gittinger
|
14
|
32 |
All Rights Reserved
|
9
|
33 |
|
|
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
|
|
36 |
inclusion of the above copyright notice. This software may not
|
|
37 |
be provided or otherwise made available to, or used by, any
|
|
38 |
other person. No title to or ownership of the software is
|
|
39 |
hereby transferred.
|
|
40 |
"
|
|
41 |
!
|
|
42 |
|
|
43 |
version
|
|
44 |
"
|
14
|
45 |
$Header: /cvs/stx/stx/libbasic3/WrappedMethod.st,v 1.4 1994-11-28 20:57:03 claus Exp $
|
9
|
46 |
"
|
|
47 |
!
|
|
48 |
|
|
49 |
documentation
|
|
50 |
"
|
|
51 |
support for MessageTracer
|
|
52 |
"
|
|
53 |
! !
|
|
54 |
|
8
|
55 |
!WrappedMethod methodsFor:'queries'!
|
|
56 |
|
|
57 |
isWrapped
|
14
|
58 |
"return true, if the receiver is a wrapped method.
|
|
59 |
True is returned here, since the receiver is always a wrapped one"
|
|
60 |
|
8
|
61 |
^ true
|
|
62 |
! !
|
|
63 |
|
|
64 |
!WrappedMethod methodsFor:'accessing'!
|
|
65 |
|
|
66 |
originalMethod
|
14
|
67 |
"return the method the receiver is wrapping"
|
8
|
68 |
|
|
69 |
"a kludge: it must be in the literal array somewhere"
|
|
70 |
literals do:[:aLiteral |
|
14
|
71 |
aLiteral class == Method ifTrue:[
|
|
72 |
^ aLiteral
|
|
73 |
]
|
8
|
74 |
].
|
|
75 |
^ nil
|
|
76 |
!
|
|
77 |
|
|
78 |
basicLiterals
|
|
79 |
"return my literals"
|
|
80 |
|
|
81 |
^ literals
|
|
82 |
!
|
|
83 |
|
|
84 |
source
|
|
85 |
"return the wrapped methods source"
|
|
86 |
|
|
87 |
^ self originalMethod source
|
|
88 |
!
|
|
89 |
|
|
90 |
literals
|
|
91 |
"return the wrapped methods literals"
|
|
92 |
|
|
93 |
^ self originalMethod literals
|
|
94 |
!
|
|
95 |
|
|
96 |
numberOfMethodVars
|
14
|
97 |
"return the number of locals in the wrapped method."
|
|
98 |
|
10
|
99 |
^ self originalMethod numberOfMethodVars
|
8
|
100 |
!
|
|
101 |
|
|
102 |
methodVarNames
|
14
|
103 |
"return the names of the locals of the wrapped method."
|
|
104 |
|
10
|
105 |
^ self originalMethod methodVarNames
|
14
|
106 |
!
|
|
107 |
|
|
108 |
methodArgAndVarNames
|
|
109 |
"return the names of the args and locals of the wrapped method."
|
|
110 |
|
|
111 |
^ self originalMethod methodArgAndVarNames
|
8
|
112 |
! !
|
|
113 |
|