8
|
1 |
'From Smalltalk/X, Version:2.10.1 on 7-may-1994 at 20:55:26'!
|
|
2 |
|
|
3 |
Method subclass:#WrappedMethod
|
|
4 |
instanceVariableNames:''
|
|
5 |
classVariableNames:''
|
|
6 |
poolDictionaries:''
|
|
7 |
category:'Kernel-Methods'
|
|
8 |
!
|
|
9 |
|
|
10 |
!WrappedMethod methodsFor:'queries'!
|
|
11 |
|
|
12 |
isWrapped
|
|
13 |
^ true
|
|
14 |
! !
|
|
15 |
|
|
16 |
!WrappedMethod methodsFor:'accessing'!
|
|
17 |
|
|
18 |
originalMethod
|
|
19 |
"return the method I am wrapping"
|
|
20 |
|
|
21 |
"a kludge: it must be in the literal array somewhere"
|
|
22 |
literals do:[:aLiteral |
|
|
23 |
aLiteral class == Method ifTrue:[
|
|
24 |
^ aLiteral
|
|
25 |
]
|
|
26 |
].
|
|
27 |
^ nil
|
|
28 |
!
|
|
29 |
|
|
30 |
basicLiterals
|
|
31 |
"return my literals"
|
|
32 |
|
|
33 |
^ literals
|
|
34 |
!
|
|
35 |
|
|
36 |
methodArgAndVarNames
|
|
37 |
|names|
|
|
38 |
|
|
39 |
names := self methodArgNames.
|
|
40 |
names isNil ifTrue:[^ #()].
|
|
41 |
^ names
|
|
42 |
!
|
|
43 |
|
|
44 |
source
|
|
45 |
"return the wrapped methods source"
|
|
46 |
|
|
47 |
^ self originalMethod source
|
|
48 |
!
|
|
49 |
|
|
50 |
literals
|
|
51 |
"return the wrapped methods literals"
|
|
52 |
|
|
53 |
^ self originalMethod literals
|
|
54 |
!
|
|
55 |
|
|
56 |
numberOfMethodVars
|
|
57 |
^ 0
|
|
58 |
!
|
|
59 |
|
|
60 |
methodVarNames
|
|
61 |
^ nil
|
|
62 |
! !
|
|
63 |
|