author | mawalch |
Wed, 17 May 2017 12:52:38 +0200 | |
changeset 4238 | e3824d6ddfb7 |
parent 4213 | 30d0d0045710 |
child 4392 | 40dcd434117c |
permissions | -rw-r--r-- |
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 |
" |
|
940
2ec011688c35
more queries (sentMessages ...)
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
12 |
"{ Package: 'stx:libbasic3' }" |
2ec011688c35
more queries (sentMessages ...)
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
13 |
|
3878 | 14 |
"{ NameSpace: Smalltalk }" |
15 |
||
729 | 16 |
Method variableSubclass:#WrappedMethod |
210
3638d229ce41
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
68
diff
changeset
|
17 |
instanceVariableNames:'' |
2395
e9082ccc0d80
remember wrapped methods to speedup allInstances
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
18 |
classVariableNames:'AllWrappedMethods' |
210
3638d229ce41
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
68
diff
changeset
|
19 |
poolDictionaries:'' |
3638d229ce41
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
68
diff
changeset
|
20 |
category:'Kernel-Methods' |
8 | 21 |
! |
22 |
||
508 | 23 |
!WrappedMethod class methodsFor:'documentation'! |
9 | 24 |
|
25 |
copyright |
|
26 |
" |
|
27 |
COPYRIGHT (c) 1994 by Claus Gittinger |
|
14 | 28 |
All Rights Reserved |
9 | 29 |
|
30 |
This software is furnished under a license and may be used |
|
31 |
only in accordance with the terms of that license and with the |
|
32 |
inclusion of the above copyright notice. This software may not |
|
33 |
be provided or otherwise made available to, or used by, any |
|
34 |
other person. No title to or ownership of the software is |
|
35 |
hereby transferred. |
|
36 |
" |
|
37 |
! |
|
38 |
||
39 |
documentation |
|
40 |
" |
|
41 |
support for MessageTracer |
|
234 | 42 |
|
2395
e9082ccc0d80
remember wrapped methods to speedup allInstances
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
43 |
notice: remembers wrappers in a weak classvar, because finding the wrapper for a |
e9082ccc0d80
remember wrapped methods to speedup allInstances
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
44 |
method is required for single stepping, and used to take a long time when using allInstances. |
e9082ccc0d80
remember wrapped methods to speedup allInstances
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
45 |
Therefore, wrappers are remembered. |
e9082ccc0d80
remember wrapped methods to speedup allInstances
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
46 |
|
234 | 47 |
[author:] |
48 |
Claus Gittinger |
|
49 |
||
50 |
[see also:] |
|
51 |
MessageTracer |
|
9 | 52 |
" |
53 |
! ! |
|
54 |
||
2395
e9082ccc0d80
remember wrapped methods to speedup allInstances
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
55 |
!WrappedMethod class methodsFor:'registration'! |
e9082ccc0d80
remember wrapped methods to speedup allInstances
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
56 |
|
e9082ccc0d80
remember wrapped methods to speedup allInstances
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
57 |
allInstancesDo:aBlock |
3585 | 58 |
self allWrappedMethodsDo:aBlock |
59 |
! |
|
2395
e9082ccc0d80
remember wrapped methods to speedup allInstances
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
60 |
|
3585 | 61 |
allWrappedMethods |
62 |
AllWrappedMethods isNil ifTrue:[^ #() ]. |
|
63 |
^ AllWrappedMethods |
|
64 |
select:[:m | |
|
3586 | 65 |
"/ must double check - as this is a weak set, it gets cleaned up with a delay. |
3585 | 66 |
m mclass notNil |
67 |
] |
|
68 |
as:OrderedCollection |
|
69 |
||
70 |
" |
|
71 |
self allWrappedMethods |
|
72 |
" |
|
73 |
! |
|
74 |
||
75 |
allWrappedMethodsDo:aBlock |
|
76 |
AllWrappedMethods isNil ifTrue:[^ self ]. |
|
77 |
self allWrappedMethods do:aBlock |
|
2395
e9082ccc0d80
remember wrapped methods to speedup allInstances
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
78 |
! |
e9082ccc0d80
remember wrapped methods to speedup allInstances
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
79 |
|
e9082ccc0d80
remember wrapped methods to speedup allInstances
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
80 |
register:aWrappedMethod |
e9082ccc0d80
remember wrapped methods to speedup allInstances
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
81 |
AllWrappedMethods isNil ifTrue:[ |
e9082ccc0d80
remember wrapped methods to speedup allInstances
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
82 |
AllWrappedMethods := WeakIdentitySet new. |
e9082ccc0d80
remember wrapped methods to speedup allInstances
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
83 |
]. |
e9082ccc0d80
remember wrapped methods to speedup allInstances
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
84 |
AllWrappedMethods add:aWrappedMethod |
e9082ccc0d80
remember wrapped methods to speedup allInstances
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
85 |
|
e9082ccc0d80
remember wrapped methods to speedup allInstances
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
86 |
"Created: / 01-07-2011 / 09:44:56 / cg" |
e9082ccc0d80
remember wrapped methods to speedup allInstances
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
87 |
! |
e9082ccc0d80
remember wrapped methods to speedup allInstances
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
88 |
|
e9082ccc0d80
remember wrapped methods to speedup allInstances
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
89 |
unregister:aWrappedMethod |
e9082ccc0d80
remember wrapped methods to speedup allInstances
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
90 |
AllWrappedMethods notNil ifTrue:[ |
e9082ccc0d80
remember wrapped methods to speedup allInstances
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
91 |
AllWrappedMethods remove:aWrappedMethod ifAbsent:[] |
e9082ccc0d80
remember wrapped methods to speedup allInstances
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
92 |
]. |
e9082ccc0d80
remember wrapped methods to speedup allInstances
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
93 |
|
e9082ccc0d80
remember wrapped methods to speedup allInstances
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
94 |
"Created: / 01-07-2011 / 10:03:55 / cg" |
e9082ccc0d80
remember wrapped methods to speedup allInstances
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
95 |
! ! |
e9082ccc0d80
remember wrapped methods to speedup allInstances
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
96 |
|
210
3638d229ce41
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
68
diff
changeset
|
97 |
!WrappedMethod methodsFor:'accessing'! |
3638d229ce41
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
68
diff
changeset
|
98 |
|
3638d229ce41
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
68
diff
changeset
|
99 |
basicLiterals |
3638d229ce41
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
68
diff
changeset
|
100 |
"return my literals" |
3638d229ce41
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
68
diff
changeset
|
101 |
|
352
ac12b5bc2754
Move method's literals form literalArray to indexed instvars.
Stefan Vogel <sv@exept.de>
parents:
234
diff
changeset
|
102 |
^ super literals |
ac12b5bc2754
Move method's literals form literalArray to indexed instvars.
Stefan Vogel <sv@exept.de>
parents:
234
diff
changeset
|
103 |
|
ac12b5bc2754
Move method's literals form literalArray to indexed instvars.
Stefan Vogel <sv@exept.de>
parents:
234
diff
changeset
|
104 |
"Modified: 24.6.1996 / 14:10:34 / stefan" |
210
3638d229ce41
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
68
diff
changeset
|
105 |
! |
3638d229ce41
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
68
diff
changeset
|
106 |
|
1367
00692bfc2516
care for category and package changes
Claus Gittinger <cg@exept.de>
parents:
971
diff
changeset
|
107 |
category:newCategory |
00692bfc2516
care for category and package changes
Claus Gittinger <cg@exept.de>
parents:
971
diff
changeset
|
108 |
super category:newCategory. |
00692bfc2516
care for category and package changes
Claus Gittinger <cg@exept.de>
parents:
971
diff
changeset
|
109 |
self originalMethod category:newCategory |
00692bfc2516
care for category and package changes
Claus Gittinger <cg@exept.de>
parents:
971
diff
changeset
|
110 |
! |
00692bfc2516
care for category and package changes
Claus Gittinger <cg@exept.de>
parents:
971
diff
changeset
|
111 |
|
210
3638d229ce41
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
68
diff
changeset
|
112 |
literals |
2931 | 113 |
"return the wrapped method's literals" |
210
3638d229ce41
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
68
diff
changeset
|
114 |
|
3638d229ce41
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
68
diff
changeset
|
115 |
^ self originalMethod literals |
3638d229ce41
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
68
diff
changeset
|
116 |
! |
8 | 117 |
|
644
ffba6b23cc6d
Redirect privacy and more literal sends to originalMethod
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
118 |
literalsDetect:aBlock ifNone:exceptionBlock |
2931 | 119 |
"access the wrapped method's literals" |
644
ffba6b23cc6d
Redirect privacy and more literal sends to originalMethod
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
120 |
|
ffba6b23cc6d
Redirect privacy and more literal sends to originalMethod
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
121 |
^ self originalMethod literalsDetect:aBlock ifNone:exceptionBlock |
ffba6b23cc6d
Redirect privacy and more literal sends to originalMethod
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
122 |
|
ffba6b23cc6d
Redirect privacy and more literal sends to originalMethod
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
123 |
"Created: / 23.1.1998 / 13:23:15 / stefan" |
ffba6b23cc6d
Redirect privacy and more literal sends to originalMethod
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
124 |
! |
ffba6b23cc6d
Redirect privacy and more literal sends to originalMethod
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
125 |
|
ffba6b23cc6d
Redirect privacy and more literal sends to originalMethod
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
126 |
literalsDo:aBlock |
2931 | 127 |
"access the wrapped method's literals" |
644
ffba6b23cc6d
Redirect privacy and more literal sends to originalMethod
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
128 |
|
ffba6b23cc6d
Redirect privacy and more literal sends to originalMethod
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
129 |
^ self originalMethod literalsDo:aBlock |
ffba6b23cc6d
Redirect privacy and more literal sends to originalMethod
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
130 |
|
ffba6b23cc6d
Redirect privacy and more literal sends to originalMethod
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
131 |
"Created: / 23.1.1998 / 13:09:36 / stefan" |
ffba6b23cc6d
Redirect privacy and more literal sends to originalMethod
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
132 |
"Modified: / 23.1.1998 / 13:22:38 / stefan" |
ffba6b23cc6d
Redirect privacy and more literal sends to originalMethod
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
133 |
! |
ffba6b23cc6d
Redirect privacy and more literal sends to originalMethod
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
134 |
|
210
3638d229ce41
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
68
diff
changeset
|
135 |
methodArgAndVarNames |
3638d229ce41
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
68
diff
changeset
|
136 |
"return the names of the args and locals of the wrapped method." |
3638d229ce41
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
68
diff
changeset
|
137 |
|
3638d229ce41
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
68
diff
changeset
|
138 |
^ self originalMethod methodArgAndVarNames |
3638d229ce41
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
68
diff
changeset
|
139 |
! |
3638d229ce41
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
68
diff
changeset
|
140 |
|
3456 | 141 |
methodArgAndVarNamesInContext: context |
142 |
"return the names of the args and locals of the wrapped method. |
|
143 |
in given context (for Java, as in java local names differ by |
|
144 |
actual program counter)" |
|
145 |
||
146 |
^ self originalMethod methodArgAndVarNamesInContext: context |
|
147 |
||
148 |
"Created: / 18-12-2012 / 18:16:44 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
149 |
! |
|
150 |
||
210
3638d229ce41
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
68
diff
changeset
|
151 |
methodVarNames |
3638d229ce41
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
68
diff
changeset
|
152 |
"return the names of the locals of the wrapped method." |
14 | 153 |
|
210
3638d229ce41
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
68
diff
changeset
|
154 |
^ self originalMethod methodVarNames |
3638d229ce41
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
68
diff
changeset
|
155 |
! |
8 | 156 |
|
508 | 157 |
numVars |
210
3638d229ce41
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
68
diff
changeset
|
158 |
"return the number of locals in the wrapped method." |
3638d229ce41
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
68
diff
changeset
|
159 |
|
508 | 160 |
^ self originalMethod numVars |
161 |
||
162 |
"Created: 4.11.1996 / 21:40:10 / cg" |
|
210
3638d229ce41
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
68
diff
changeset
|
163 |
! |
8 | 164 |
|
165 |
originalMethod |
|
14 | 166 |
"return the method the receiver is wrapping" |
8 | 167 |
|
644
ffba6b23cc6d
Redirect privacy and more literal sends to originalMethod
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
168 |
"a kludge: it must be in my literal array somewhere" |
ffba6b23cc6d
Redirect privacy and more literal sends to originalMethod
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
169 |
super literalsDo:[:aLiteral | |
352
ac12b5bc2754
Move method's literals form literalArray to indexed instvars.
Stefan Vogel <sv@exept.de>
parents:
234
diff
changeset
|
170 |
aLiteral isMethod ifTrue:[ |
ac12b5bc2754
Move method's literals form literalArray to indexed instvars.
Stefan Vogel <sv@exept.de>
parents:
234
diff
changeset
|
171 |
^ aLiteral |
ac12b5bc2754
Move method's literals form literalArray to indexed instvars.
Stefan Vogel <sv@exept.de>
parents:
234
diff
changeset
|
172 |
] |
8 | 173 |
]. |
174 |
^ nil |
|
352
ac12b5bc2754
Move method's literals form literalArray to indexed instvars.
Stefan Vogel <sv@exept.de>
parents:
234
diff
changeset
|
175 |
|
644
ffba6b23cc6d
Redirect privacy and more literal sends to originalMethod
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
176 |
"Modified: / 23.1.1998 / 13:08:25 / stefan" |
ffba6b23cc6d
Redirect privacy and more literal sends to originalMethod
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
177 |
! |
ffba6b23cc6d
Redirect privacy and more literal sends to originalMethod
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
178 |
|
2293 | 179 |
originalMethodIfWrapped |
180 |
"return the method the receiver is wrapping" |
|
181 |
||
182 |
^ self originalMethod |
|
183 |
||
184 |
"Created: / 22-10-2010 / 11:45:42 / cg" |
|
185 |
! |
|
186 |
||
1367
00692bfc2516
care for category and package changes
Claus Gittinger <cg@exept.de>
parents:
971
diff
changeset
|
187 |
package:aSymbol |
00692bfc2516
care for category and package changes
Claus Gittinger <cg@exept.de>
parents:
971
diff
changeset
|
188 |
super package:aSymbol. |
00692bfc2516
care for category and package changes
Claus Gittinger <cg@exept.de>
parents:
971
diff
changeset
|
189 |
self originalMethod package:aSymbol |
00692bfc2516
care for category and package changes
Claus Gittinger <cg@exept.de>
parents:
971
diff
changeset
|
190 |
! |
00692bfc2516
care for category and package changes
Claus Gittinger <cg@exept.de>
parents:
971
diff
changeset
|
191 |
|
644
ffba6b23cc6d
Redirect privacy and more literal sends to originalMethod
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
192 |
privacy |
2931 | 193 |
"return the wrapped method's privacy" |
644
ffba6b23cc6d
Redirect privacy and more literal sends to originalMethod
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
194 |
|
ffba6b23cc6d
Redirect privacy and more literal sends to originalMethod
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
195 |
^ self originalMethod privacy |
ffba6b23cc6d
Redirect privacy and more literal sends to originalMethod
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
196 |
|
ffba6b23cc6d
Redirect privacy and more literal sends to originalMethod
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
197 |
"Created: / 23.1.1998 / 13:09:17 / stefan" |
ffba6b23cc6d
Redirect privacy and more literal sends to originalMethod
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
198 |
"Modified: / 23.1.1998 / 13:20:59 / stefan" |
ffba6b23cc6d
Redirect privacy and more literal sends to originalMethod
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
199 |
! |
ffba6b23cc6d
Redirect privacy and more literal sends to originalMethod
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
200 |
|
1396 | 201 |
privacy:aSymbol |
2931 | 202 |
"set the wrapped method's privacy" |
1396 | 203 |
|
204 |
^ self originalMethod privacy:aSymbol |
|
205 |
! |
|
206 |
||
2182 | 207 |
programmingLanguage |
3392 | 208 |
^ (self originalMethod ? self mclass ? Smalltalk) programmingLanguage |
209 |
||
210 |
"Modified: / 29-08-2013 / 10:59:20 / cg" |
|
2182 | 211 |
! |
212 |
||
3306 | 213 |
replaceOriginalMethodWith:aNewMethod |
214 |
"change the original method which is going to be invoked by this wrapper. |
|
215 |
The only place where this makes sense is when the original method has to be |
|
216 |
replaced by a recompiled breakpointed method (in the debugger)." |
|
217 |
||
218 |
"a kludge: it is in my literal array somewhere" |
|
219 |
1 to:(super numLiterals) do:[:i | |
|
220 |
(super literalAt:i) isMethod ifTrue:[ |
|
221 |
super literalAt:i put:aNewMethod. |
|
222 |
^ self. |
|
223 |
] |
|
224 |
]. |
|
225 |
^ self |
|
226 |
! |
|
227 |
||
1396 | 228 |
restricted:aBoolean |
229 |
^ self originalMethod restricted:aBoolean |
|
230 |
! |
|
231 |
||
644
ffba6b23cc6d
Redirect privacy and more literal sends to originalMethod
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
232 |
setPrivacy:aSymbol |
2931 | 233 |
"set the wrapped method's privacy" |
644
ffba6b23cc6d
Redirect privacy and more literal sends to originalMethod
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
234 |
|
ffba6b23cc6d
Redirect privacy and more literal sends to originalMethod
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
235 |
^ self originalMethod setPrivacy:aSymbol |
ffba6b23cc6d
Redirect privacy and more literal sends to originalMethod
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
236 |
|
ffba6b23cc6d
Redirect privacy and more literal sends to originalMethod
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
237 |
"Modified: / 23.1.1998 / 13:21:26 / stefan" |
ffba6b23cc6d
Redirect privacy and more literal sends to originalMethod
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
238 |
"Created: / 23.1.1998 / 15:26:26 / stefan" |
2101
a9c9794266b8
Redirect #source to the original method
Stefan Vogel <sv@exept.de>
parents:
2012
diff
changeset
|
239 |
! |
a9c9794266b8
Redirect #source to the original method
Stefan Vogel <sv@exept.de>
parents:
2012
diff
changeset
|
240 |
|
3630 | 241 |
shadowedMethod |
242 |
^ self originalMethod shadowedMethod |
|
243 |
||
244 |
"Created: / 03-10-2014 / 15:23:15 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
245 |
! |
|
246 |
||
2101
a9c9794266b8
Redirect #source to the original method
Stefan Vogel <sv@exept.de>
parents:
2012
diff
changeset
|
247 |
source |
a9c9794266b8
Redirect #source to the original method
Stefan Vogel <sv@exept.de>
parents:
2012
diff
changeset
|
248 |
"return the source of the method" |
a9c9794266b8
Redirect #source to the original method
Stefan Vogel <sv@exept.de>
parents:
2012
diff
changeset
|
249 |
|
a9c9794266b8
Redirect #source to the original method
Stefan Vogel <sv@exept.de>
parents:
2012
diff
changeset
|
250 |
^ self originalMethod source |
3456 | 251 |
! |
252 |
||
253 |
sourceFilename |
|
254 |
"return the sourcefilename if source is extern; nil otherwise" |
|
255 |
||
256 |
^ self originalMethod sourceFilename |
|
257 |
||
258 |
"Created: / 16-10-2013 / 00:05:11 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
259 |
! |
|
260 |
||
261 |
sourcePosition |
|
262 |
"return the sourceposition if source is extern; nil otherwise" |
|
263 |
||
264 |
^ self originalMethod sourcePosition |
|
265 |
||
266 |
"Created: / 16-10-2013 / 00:05:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
8 | 267 |
! ! |
268 |
||
3509
3ec710a1ba02
Delegate all annotation requests to original method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3456
diff
changeset
|
269 |
!WrappedMethod methodsFor:'accessing-annotations'! |
3ec710a1ba02
Delegate all annotation requests to original method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3456
diff
changeset
|
270 |
|
3ec710a1ba02
Delegate all annotation requests to original method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3456
diff
changeset
|
271 |
annotateWith: annotation |
3516 | 272 |
"add a (hidden) annotation" |
273 |
||
3509
3ec710a1ba02
Delegate all annotation requests to original method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3456
diff
changeset
|
274 |
^ self originalMethod annotateWith: annotation |
3ec710a1ba02
Delegate all annotation requests to original method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3456
diff
changeset
|
275 |
|
3ec710a1ba02
Delegate all annotation requests to original method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3456
diff
changeset
|
276 |
"Created: / 24-02-2014 / 22:47:59 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
3ec710a1ba02
Delegate all annotation requests to original method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3456
diff
changeset
|
277 |
! |
3ec710a1ba02
Delegate all annotation requests to original method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3456
diff
changeset
|
278 |
|
3ec710a1ba02
Delegate all annotation requests to original method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3456
diff
changeset
|
279 |
annotationAt: key |
3ec710a1ba02
Delegate all annotation requests to original method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3456
diff
changeset
|
280 |
^ self originalMethod annotationAt: key |
3ec710a1ba02
Delegate all annotation requests to original method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3456
diff
changeset
|
281 |
|
3ec710a1ba02
Delegate all annotation requests to original method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3456
diff
changeset
|
282 |
"Created: / 24-02-2014 / 22:49:11 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
3ec710a1ba02
Delegate all annotation requests to original method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3456
diff
changeset
|
283 |
! |
3ec710a1ba02
Delegate all annotation requests to original method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3456
diff
changeset
|
284 |
|
3ec710a1ba02
Delegate all annotation requests to original method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3456
diff
changeset
|
285 |
annotations |
3ec710a1ba02
Delegate all annotation requests to original method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3456
diff
changeset
|
286 |
"return the wrapped method's annotations" |
3ec710a1ba02
Delegate all annotation requests to original method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3456
diff
changeset
|
287 |
|
3ec710a1ba02
Delegate all annotation requests to original method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3456
diff
changeset
|
288 |
^ self originalMethod annotations |
3ec710a1ba02
Delegate all annotation requests to original method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3456
diff
changeset
|
289 |
|
3ec710a1ba02
Delegate all annotation requests to original method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3456
diff
changeset
|
290 |
"Created: / 04-12-2011 / 11:22:13 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
3ec710a1ba02
Delegate all annotation requests to original method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3456
diff
changeset
|
291 |
! |
3ec710a1ba02
Delegate all annotation requests to original method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3456
diff
changeset
|
292 |
|
3ec710a1ba02
Delegate all annotation requests to original method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3456
diff
changeset
|
293 |
annotations: anObject |
3ec710a1ba02
Delegate all annotation requests to original method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3456
diff
changeset
|
294 |
self originalMethod annotations: anObject |
3ec710a1ba02
Delegate all annotation requests to original method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3456
diff
changeset
|
295 |
|
3ec710a1ba02
Delegate all annotation requests to original method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3456
diff
changeset
|
296 |
"Created: / 24-02-2014 / 22:49:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
3ec710a1ba02
Delegate all annotation requests to original method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3456
diff
changeset
|
297 |
! |
3ec710a1ba02
Delegate all annotation requests to original method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3456
diff
changeset
|
298 |
|
3ec710a1ba02
Delegate all annotation requests to original method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3456
diff
changeset
|
299 |
annotationsAt: key |
3ec710a1ba02
Delegate all annotation requests to original method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3456
diff
changeset
|
300 |
^ self originalMethod annotationAt: key |
3ec710a1ba02
Delegate all annotation requests to original method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3456
diff
changeset
|
301 |
|
3ec710a1ba02
Delegate all annotation requests to original method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3456
diff
changeset
|
302 |
"Created: / 24-02-2014 / 22:49:53 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
3ec710a1ba02
Delegate all annotation requests to original method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3456
diff
changeset
|
303 |
! |
3ec710a1ba02
Delegate all annotation requests to original method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3456
diff
changeset
|
304 |
|
3ec710a1ba02
Delegate all annotation requests to original method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3456
diff
changeset
|
305 |
annotationsAt: key1 orAt: key2 |
3ec710a1ba02
Delegate all annotation requests to original method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3456
diff
changeset
|
306 |
^ self originalMethod annotationsAt: key1 orAt: key2 |
3ec710a1ba02
Delegate all annotation requests to original method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3456
diff
changeset
|
307 |
|
3ec710a1ba02
Delegate all annotation requests to original method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3456
diff
changeset
|
308 |
"Created: / 24-02-2014 / 22:50:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
3ec710a1ba02
Delegate all annotation requests to original method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3456
diff
changeset
|
309 |
! |
3ec710a1ba02
Delegate all annotation requests to original method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3456
diff
changeset
|
310 |
|
3ec710a1ba02
Delegate all annotation requests to original method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3456
diff
changeset
|
311 |
annotationsAt: key1 orAt: key2 do: block |
3ec710a1ba02
Delegate all annotation requests to original method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3456
diff
changeset
|
312 |
^ self originalMethod annotationsAt: key1 orAt: key2 do: block |
3ec710a1ba02
Delegate all annotation requests to original method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3456
diff
changeset
|
313 |
|
3ec710a1ba02
Delegate all annotation requests to original method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3456
diff
changeset
|
314 |
"Created: / 24-02-2014 / 22:50:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
3ec710a1ba02
Delegate all annotation requests to original method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3456
diff
changeset
|
315 |
! |
3ec710a1ba02
Delegate all annotation requests to original method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3456
diff
changeset
|
316 |
|
3ec710a1ba02
Delegate all annotation requests to original method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3456
diff
changeset
|
317 |
annotationsDo: aBlock |
3ec710a1ba02
Delegate all annotation requests to original method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3456
diff
changeset
|
318 |
^ self originalMethod annotationsDo: aBlock |
3ec710a1ba02
Delegate all annotation requests to original method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3456
diff
changeset
|
319 |
|
3ec710a1ba02
Delegate all annotation requests to original method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3456
diff
changeset
|
320 |
"Created: / 24-02-2014 / 22:50:50 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
3ec710a1ba02
Delegate all annotation requests to original method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3456
diff
changeset
|
321 |
! ! |
3ec710a1ba02
Delegate all annotation requests to original method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3456
diff
changeset
|
322 |
|
2395
e9082ccc0d80
remember wrapped methods to speedup allInstances
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
323 |
!WrappedMethod methodsFor:'misc'! |
e9082ccc0d80
remember wrapped methods to speedup allInstances
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
324 |
|
2869 | 325 |
makeLocalStringSource |
326 |
||
327 |
self originalMethod makeLocalStringSource |
|
328 |
||
329 |
"Created: / 11-02-2012 / 19:09:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
330 |
! |
|
331 |
||
2395
e9082ccc0d80
remember wrapped methods to speedup allInstances
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
332 |
register |
e9082ccc0d80
remember wrapped methods to speedup allInstances
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
333 |
self class register:self |
e9082ccc0d80
remember wrapped methods to speedup allInstances
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
334 |
|
e9082ccc0d80
remember wrapped methods to speedup allInstances
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
335 |
"Created: / 01-07-2011 / 10:03:26 / cg" |
e9082ccc0d80
remember wrapped methods to speedup allInstances
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
336 |
! |
e9082ccc0d80
remember wrapped methods to speedup allInstances
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
337 |
|
e9082ccc0d80
remember wrapped methods to speedup allInstances
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
338 |
unregister |
e9082ccc0d80
remember wrapped methods to speedup allInstances
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
339 |
self class unregister:self |
e9082ccc0d80
remember wrapped methods to speedup allInstances
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
340 |
|
e9082ccc0d80
remember wrapped methods to speedup allInstances
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
341 |
"Created: / 01-07-2011 / 10:03:32 / cg" |
e9082ccc0d80
remember wrapped methods to speedup allInstances
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
342 |
! ! |
e9082ccc0d80
remember wrapped methods to speedup allInstances
Claus Gittinger <cg@exept.de>
parents:
2293
diff
changeset
|
343 |
|
3456 | 344 |
!WrappedMethod methodsFor:'printing & storing'! |
345 |
||
346 |
selectorPrintStringInBrowserFor:selector |
|
347 |
^ [ |
|
348 |
self originalMethod perform: #selectorPrintStringInBrowserFor: with: selector |
|
349 |
] on: Object messageNotUnderstoodSignal do:[ |
|
350 |
super selectorPrintStringInBrowserFor:selector |
|
351 |
]. |
|
352 |
||
353 |
"Created: / 16-10-2013 / 01:04:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
354 |
! |
|
355 |
||
356 |
selectorPrintStringInBrowserFor:selector class: class |
|
357 |
^ [ |
|
358 |
self originalMethod perform: #selectorPrintStringInBrowserFor:class: with: selector with: class |
|
359 |
] on: Object messageNotUnderstoodSignal do:[ |
|
360 |
super selectorPrintStringInBrowserFor:selector class: class |
|
361 |
]. |
|
362 |
||
363 |
"Created: / 16-10-2013 / 01:04:41 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
364 |
! ! |
|
365 |
||
3306 | 366 |
!WrappedMethod methodsFor:'printing and storing'! |
367 |
||
368 |
printOn:aStream |
|
369 |
"put a printed representation of the receiver onto aStream. |
|
370 |
Since methods do not store their class/selector, we have to search |
|
371 |
for it here." |
|
372 |
||
373 |
self basicPrintOn:aStream."/ aStream nextPutAll:(self classNameWithArticle). |
|
374 |
aStream nextPutAll:'(for '. |
|
375 |
aStream nextPutAll:self originalMethod whoString. |
|
376 |
aStream nextPutAll:')'. |
|
377 |
! ! |
|
378 |
||
2644 | 379 |
!WrappedMethod methodsFor:'private'! |
380 |
||
381 |
annotationAtIndex: index |
|
382 |
"return annotation at given index. |
|
3878 | 383 |
any raw annotation array is lazily initialized" |
2644 | 384 |
|
385 |
^self originalMethod annotationAtIndex: index |
|
386 |
||
387 |
"Created: / 16-12-2011 / 19:54:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
388 |
! |
|
389 |
||
390 |
annotationIndexOf: key |
|
391 |
||
392 |
"Returns index of annotation with given key |
|
393 |
or nil if there is no such annotation" |
|
394 |
||
395 |
^self originalMethod annotationIndexOf: key |
|
396 |
||
397 |
"Created: / 16-12-2011 / 19:53:09 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
398 |
! ! |
|
399 |
||
210
3638d229ce41
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
68
diff
changeset
|
400 |
!WrappedMethod methodsFor:'queries'! |
3638d229ce41
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
68
diff
changeset
|
401 |
|
733 | 402 |
argSignature |
403 |
^ self originalMethod argSignature |
|
404 |
||
405 |
"Created: / 27.1.1999 / 20:23:17 / cg" |
|
406 |
! |
|
407 |
||
3296 | 408 |
hasAnnotation |
409 |
"Return true iff the method has any annotation" |
|
410 |
||
411 |
^ self originalMethod hasAnnotation |
|
412 |
! |
|
413 |
||
2012 | 414 |
hasResource |
415 |
"return the wrapped methods hasResource" |
|
416 |
||
417 |
^ self originalMethod hasResource |
|
418 |
! |
|
419 |
||
576
9519831877b1
moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
420 |
isBreakpointed |
9519831877b1
moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
421 |
"return true, if the receiver is a wrapped method for a breakpoint. |
4213 | 422 |
Ask the messageTracer, since I don't know if it's a break or trace" |
576
9519831877b1
moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
423 |
|
9519831877b1
moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
424 |
^ (MessageTracer isTrapped:self) |
9519831877b1
moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
425 |
|
4213 | 426 |
"Created: / 07-04-1997 / 17:25:40 / cg" |
427 |
"Modified (comment): / 13-02-2017 / 20:35:11 / cg" |
|
576
9519831877b1
moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
428 |
! |
9519831877b1
moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
429 |
|
3610
3d4bb9c61850
Initial support for simple method mocking (for tests, mainly)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3586
diff
changeset
|
430 |
isMocked |
3d4bb9c61850
Initial support for simple method mocking (for tests, mainly)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3586
diff
changeset
|
431 |
"Return true, if the method has been mocked (by means of MessageTracer>>mockMethod:do:" |
3d4bb9c61850
Initial support for simple method mocking (for tests, mainly)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3586
diff
changeset
|
432 |
|
3d4bb9c61850
Initial support for simple method mocking (for tests, mainly)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3586
diff
changeset
|
433 |
^ MessageTracer isMocking: self. |
3d4bb9c61850
Initial support for simple method mocking (for tests, mainly)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3586
diff
changeset
|
434 |
|
3d4bb9c61850
Initial support for simple method mocking (for tests, mainly)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3586
diff
changeset
|
435 |
"Created: / 29-07-2014 / 09:50:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
3d4bb9c61850
Initial support for simple method mocking (for tests, mainly)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3586
diff
changeset
|
436 |
! |
3d4bb9c61850
Initial support for simple method mocking (for tests, mainly)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3586
diff
changeset
|
437 |
|
580 | 438 |
isTimed |
439 |
"return true, if the receiver is a wrapped method for a time measurement. |
|
4213 | 440 |
Ask the messageTracer, since I don't know if it's a break or trace" |
580 | 441 |
|
442 |
^ (MessageTracer isTiming:self) |
|
443 |
||
4213 | 444 |
"Created: / 11-04-1997 / 17:06:14 / cg" |
445 |
"Modified (comment): / 13-02-2017 / 20:35:15 / cg" |
|
580 | 446 |
! |
447 |
||
576
9519831877b1
moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
448 |
isTraced |
9519831877b1
moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
449 |
"return true, if the receiver is a wrapped method for a trace point. |
4213 | 450 |
Ask the messageTracer, since I don't know if it's a break or trace" |
576
9519831877b1
moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
451 |
|
9519831877b1
moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
452 |
^ (MessageTracer isTrapped:self) not |
9519831877b1
moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
453 |
|
4213 | 454 |
"Created: / 07-04-1997 / 17:25:54 / cg" |
455 |
"Modified (comment): / 13-02-2017 / 20:35:20 / cg" |
|
576
9519831877b1
moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
456 |
! |
9519831877b1
moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents:
551
diff
changeset
|
457 |
|
210
3638d229ce41
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
68
diff
changeset
|
458 |
isWrapped |
3638d229ce41
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
68
diff
changeset
|
459 |
"return true, if the receiver is a wrapped method. |
3638d229ce41
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
68
diff
changeset
|
460 |
True is returned here, since the receiver is always a wrapped one" |
3638d229ce41
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
68
diff
changeset
|
461 |
|
3638d229ce41
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
68
diff
changeset
|
462 |
^ true |
729 | 463 |
! |
464 |
||
971 | 465 |
messagesSent |
940
2ec011688c35
more queries (sentMessages ...)
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
466 |
"return a collection of message selectors sent by this method" |
2ec011688c35
more queries (sentMessages ...)
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
467 |
|
971 | 468 |
^ self originalMethod messagesSent |
940
2ec011688c35
more queries (sentMessages ...)
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
469 |
! |
2ec011688c35
more queries (sentMessages ...)
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
470 |
|
971 | 471 |
messagesSentToSelf |
472 |
"return a collection of message selectors sent to self by this method" |
|
940
2ec011688c35
more queries (sentMessages ...)
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
473 |
|
971 | 474 |
^ self originalMethod messagesSentToSelf |
475 |
! |
|
940
2ec011688c35
more queries (sentMessages ...)
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
476 |
|
971 | 477 |
messagesSentToSuper |
478 |
"return a collection of message selectors sent to super by this method" |
|
940
2ec011688c35
more queries (sentMessages ...)
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
479 |
|
971 | 480 |
^ self originalMethod messagesSentToSuper |
940
2ec011688c35
more queries (sentMessages ...)
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
481 |
! |
2ec011688c35
more queries (sentMessages ...)
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
482 |
|
3366 | 483 |
parse:parseSelector with:arg2 return:accessSelector or:valueIfNoSource |
3392 | 484 |
|m| |
485 |
||
486 |
(m := self originalMethod) notNil ifTrue:[ |
|
487 |
^ m parse:parseSelector with:arg2 return:accessSelector or:valueIfNoSource |
|
488 |
]. |
|
489 |
^ valueIfNoSource |
|
3366 | 490 |
|
491 |
"Created: / 02-08-2013 / 10:57:02 / cg" |
|
492 |
! |
|
493 |
||
3296 | 494 |
refersToLiteral: anObject |
495 |
^ self originalMethod refersToLiteral: anObject |
|
496 |
! |
|
497 |
||
2012 | 498 |
resources |
499 |
"return the wrapped methods resources" |
|
500 |
||
501 |
^ self originalMethod resources |
|
502 |
! |
|
503 |
||
729 | 504 |
signature |
505 |
^ self originalMethod signature |
|
506 |
||
507 |
"Created: / 14.11.1998 / 00:01:50 / cg" |
|
733 | 508 |
! |
509 |
||
510 |
signatureNameWithoutReturnType |
|
511 |
^ self originalMethod signatureNameWithoutReturnType |
|
512 |
||
513 |
"Created: / 27.1.1999 / 20:52:25 / cg" |
|
210
3638d229ce41
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
68
diff
changeset
|
514 |
! ! |
3638d229ce41
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
68
diff
changeset
|
515 |
|
508 | 516 |
!WrappedMethod class methodsFor:'documentation'! |
210
3638d229ce41
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
68
diff
changeset
|
517 |
|
3586 | 518 |
version |
4130 | 519 |
^ '$Header$' |
3586 | 520 |
! |
521 |
||
522 |
version_CVS |
|
4130 | 523 |
^ '$Header$' |
3586 | 524 |
! |
525 |
||
2869 | 526 |
version_SVN |
4130 | 527 |
^ '$Id$' |
210
3638d229ce41
subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents:
68
diff
changeset
|
528 |
! ! |
3296 | 529 |