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