author | vranyj1 |
Sun, 04 Dec 2011 19:53:48 +0000 | |
branch | jk_new_structure |
changeset 1213 | fc90769151e8 |
parent 1209 | 953b9d7c328a |
child 1217 | a7d011bc112b |
permissions | -rw-r--r-- |
752 | 1 |
" |
877 | 2 |
COPYRIGHT (c) 1996-2011 by Claus Gittinger |
1152 | 3 |
|
1155 | 4 |
New code and modifications done at SWING Research Group [1]: |
1152 | 5 |
|
877 | 6 |
COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko |
7 |
SWING Research Group, Czech Technical University in Prague |
|
8 |
||
752 | 9 |
This software is furnished under a license and may be used |
10 |
only in accordance with the terms of that license and with the |
|
11 |
inclusion of the above copyright notice. This software may not |
|
12 |
be provided or otherwise made available to, or used by, any |
|
13 |
other person. No title to or ownership of the software is |
|
14 |
hereby transferred. |
|
877 | 15 |
|
1155 | 16 |
[1] Code written at SWING Research Group contains a signature |
17 |
of one of the above copright owners. For exact set of such code, |
|
18 |
see the differences between this version and version stx:libjava |
|
1152 | 19 |
as of 1.9.2010 |
752 | 20 |
" |
21 |
"{ Package: 'stx:libjava' }" |
|
22 |
||
23 |
Object subclass:#JavaObject |
|
24 |
instanceVariableNames:'' |
|
25 |
classVariableNames:'' |
|
26 |
poolDictionaries:'' |
|
27 |
category:'Languages-Java-Classes' |
|
28 |
! |
|
29 |
||
30 |
!JavaObject class methodsFor:'documentation'! |
|
31 |
||
32 |
copyright |
|
33 |
" |
|
877 | 34 |
COPYRIGHT (c) 1996-2011 by Claus Gittinger |
1152 | 35 |
|
1155 | 36 |
New code and modifications done at SWING Research Group [1]: |
1152 | 37 |
|
877 | 38 |
COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko |
39 |
SWING Research Group, Czech Technical University in Prague |
|
40 |
||
752 | 41 |
This software is furnished under a license and may be used |
42 |
only in accordance with the terms of that license and with the |
|
43 |
inclusion of the above copyright notice. This software may not |
|
44 |
be provided or otherwise made available to, or used by, any |
|
45 |
other person. No title to or ownership of the software is |
|
46 |
hereby transferred. |
|
877 | 47 |
|
1155 | 48 |
[1] Code written at SWING Research Group contains a signature |
49 |
of one of the above copright owners. For exact set of such code, |
|
50 |
see the differences between this version and version stx:libjava |
|
1152 | 51 |
as of 1.9.2010 |
877 | 52 |
|
752 | 53 |
" |
54 |
! ! |
|
55 |
||
56 |
!JavaObject class methodsFor:'misc'! |
|
57 |
||
58 |
resolveClassRefs |
|
59 |
! |
|
60 |
||
61 |
resolveClassRefsIgnoring:setOfClasses |
|
62 |
! ! |
|
63 |
||
64 |
!JavaObject class methodsFor:'smalltalk interface'! |
|
65 |
||
66 |
convertJavaObject:val signature:retValSignature |
|
67 |
^ val. |
|
68 |
||
69 |
retValSignature = 'void' ifTrue:[ |
|
70 |
^ #void |
|
71 |
]. |
|
72 |
retValSignature = 'boolean' ifTrue:[ |
|
73 |
val == 0 ifTrue:[^ false]. |
|
74 |
^ true |
|
75 |
]. |
|
76 |
retValSignature = 'int' ifTrue:[ |
|
77 |
val isInteger ifFalse:[ |
|
78 |
self halt |
|
79 |
]. |
|
80 |
^ val |
|
81 |
]. |
|
82 |
retValSignature = 'char[]' ifTrue:[ |
|
83 |
"/ these are ST-strings |
|
84 |
^ val |
|
85 |
]. |
|
86 |
||
87 |
retValSignature = 'char' ifTrue:[ |
|
88 |
"/ these are ST-characters |
|
89 |
val isInteger ifTrue:[ |
|
90 |
^ Character value:val |
|
91 |
]. |
|
92 |
self halt. |
|
93 |
^ val |
|
94 |
]. |
|
95 |
||
96 |
retValSignature = 'Object' ifTrue:[ |
|
97 |
^ val |
|
98 |
]. |
|
99 |
||
100 |
retValSignature = 'String' ifTrue:[ |
|
101 |
^ Java as_ST_String:val |
|
102 |
]. |
|
103 |
||
104 |
'no conversion for: ' print. val class name print. ' to: ' print. retValSignature printNL. |
|
105 |
^ val. |
|
106 |
||
107 |
"Modified: 8.8.1997 / 12:07:23 / cg" |
|
108 |
! |
|
109 |
||
110 |
javaStringFrom:aString |
|
111 |
"hard-coding internas of java.lang.String here is bad ..." |
|
112 |
||
113 |
self halt. |
|
114 |
^ Java as_String:aString |
|
115 |
||
116 |
"Modified: 7.8.1997 / 21:17:32 / cg" |
|
117 |
! |
|
118 |
||
119 |
stringFromJavaString:aJavaString |
|
120 |
"hard-coding internas of java.lang.String here is bad ..." |
|
121 |
||
122 |
self halt. |
|
123 |
^ Java as_ST_String:aJavaString |
|
124 |
||
125 |
"Modified: 8.8.1997 / 12:07:29 / cg" |
|
126 |
! ! |
|
127 |
||
1109
9bd0544f9046
Initial version of finalize() support - may crash VM!
vranyj1
parents:
1093
diff
changeset
|
128 |
!JavaObject methodsFor:'finalization'! |
9bd0544f9046
Initial version of finalize() support - may crash VM!
vranyj1
parents:
1093
diff
changeset
|
129 |
|
9bd0544f9046
Initial version of finalize() support - may crash VM!
vranyj1
parents:
1093
diff
changeset
|
130 |
finalize |
9bd0544f9046
Initial version of finalize() support - may crash VM!
vranyj1
parents:
1093
diff
changeset
|
131 |
|
9bd0544f9046
Initial version of finalize() support - may crash VM!
vranyj1
parents:
1093
diff
changeset
|
132 |
Logger log: 'Finalizing ', self javaDisplayString severity: #info facility: #JVM. |
9bd0544f9046
Initial version of finalize() support - may crash VM!
vranyj1
parents:
1093
diff
changeset
|
133 |
[ self perform: #'finalize()V' ] on: Error do:["Nothing. see spec"] |
9bd0544f9046
Initial version of finalize() support - may crash VM!
vranyj1
parents:
1093
diff
changeset
|
134 |
|
9bd0544f9046
Initial version of finalize() support - may crash VM!
vranyj1
parents:
1093
diff
changeset
|
135 |
"Created: / 14-11-2011 / 12:32:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
9bd0544f9046
Initial version of finalize() support - may crash VM!
vranyj1
parents:
1093
diff
changeset
|
136 |
! ! |
9bd0544f9046
Initial version of finalize() support - may crash VM!
vranyj1
parents:
1093
diff
changeset
|
137 |
|
752 | 138 |
!JavaObject methodsFor:'initialization'! |
139 |
||
140 |
initializeToZero |
|
141 |
|sz| |
|
142 |
||
143 |
sz := self class instSize. |
|
144 |
1 to:sz do:[:i | |
|
145 |
self instVarAt:i put:0 |
|
146 |
] |
|
147 |
! ! |
|
148 |
||
1213
fc90769151e8
- fix in reflection over methods (signature is nil for non-generic methods)
vranyj1
parents:
1209
diff
changeset
|
149 |
!JavaObject methodsFor:'inspecting'! |
fc90769151e8
- fix in reflection over methods (signature is nil for non-generic methods)
vranyj1
parents:
1209
diff
changeset
|
150 |
|
fc90769151e8
- fix in reflection over methods (signature is nil for non-generic methods)
vranyj1
parents:
1209
diff
changeset
|
151 |
inspectorExtraAttributes |
fc90769151e8
- fix in reflection over methods (signature is nil for non-generic methods)
vranyj1
parents:
1209
diff
changeset
|
152 |
|
fc90769151e8
- fix in reflection over methods (signature is nil for non-generic methods)
vranyj1
parents:
1209
diff
changeset
|
153 |
| attrs nm | |
fc90769151e8
- fix in reflection over methods (signature is nil for non-generic methods)
vranyj1
parents:
1209
diff
changeset
|
154 |
|
fc90769151e8
- fix in reflection over methods (signature is nil for non-generic methods)
vranyj1
parents:
1209
diff
changeset
|
155 |
attrs := super inspectorExtraAttributes. |
fc90769151e8
- fix in reflection over methods (signature is nil for non-generic methods)
vranyj1
parents:
1209
diff
changeset
|
156 |
nm := self class name. |
fc90769151e8
- fix in reflection over methods (signature is nil for non-generic methods)
vranyj1
parents:
1209
diff
changeset
|
157 |
nm == #'java/lang/reflect/Method' ifTrue:[ |
fc90769151e8
- fix in reflection over methods (signature is nil for non-generic methods)
vranyj1
parents:
1209
diff
changeset
|
158 |
attrs at:'-method' put: (JavaVM reflection methodForJavaMethodObject: self). |
fc90769151e8
- fix in reflection over methods (signature is nil for non-generic methods)
vranyj1
parents:
1209
diff
changeset
|
159 |
^attrs. |
fc90769151e8
- fix in reflection over methods (signature is nil for non-generic methods)
vranyj1
parents:
1209
diff
changeset
|
160 |
]. |
fc90769151e8
- fix in reflection over methods (signature is nil for non-generic methods)
vranyj1
parents:
1209
diff
changeset
|
161 |
nm == #'java/lang/reflect/Class' ifTrue:[ |
fc90769151e8
- fix in reflection over methods (signature is nil for non-generic methods)
vranyj1
parents:
1209
diff
changeset
|
162 |
attrs at:'-class' put: (JavaVM reflection classForJavaClassObject: self). |
fc90769151e8
- fix in reflection over methods (signature is nil for non-generic methods)
vranyj1
parents:
1209
diff
changeset
|
163 |
^attrs. |
fc90769151e8
- fix in reflection over methods (signature is nil for non-generic methods)
vranyj1
parents:
1209
diff
changeset
|
164 |
]. |
fc90769151e8
- fix in reflection over methods (signature is nil for non-generic methods)
vranyj1
parents:
1209
diff
changeset
|
165 |
^attrs |
fc90769151e8
- fix in reflection over methods (signature is nil for non-generic methods)
vranyj1
parents:
1209
diff
changeset
|
166 |
|
fc90769151e8
- fix in reflection over methods (signature is nil for non-generic methods)
vranyj1
parents:
1209
diff
changeset
|
167 |
"Created: / 04-12-2011 / 19:28:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
fc90769151e8
- fix in reflection over methods (signature is nil for non-generic methods)
vranyj1
parents:
1209
diff
changeset
|
168 |
! ! |
fc90769151e8
- fix in reflection over methods (signature is nil for non-generic methods)
vranyj1
parents:
1209
diff
changeset
|
169 |
|
752 | 170 |
!JavaObject methodsFor:'message sending'! |
171 |
||
172 |
doesNotUnderstand:aMessage |
|
173 |
"as a courtesy to the smalltalker, try to map methods" |
|
1001 | 174 |
^ JavaClass |
175 |
perform: aMessage |
|
176 |
onReceiver: self |
|
177 |
from: thisContext sender |
|
178 |
ifNotFound: [ super doesNotUnderstand: aMessage] |
|
179 |
||
180 |
"/ [ |
|
181 |
"/ ^ JavaLookup instance |
|
182 |
"/ perform: aMessage onReceiver: self from: thisContext sender. |
|
183 |
"/ ] on: JavaDoesNotUnderstandException |
|
184 |
"/ do: [:e | |
|
185 |
"/ ^ super doesNotUnderstand: aMessage. |
|
186 |
"/ ] |
|
949
8452984ed807
New Implementation of JavaLookup. Slow, no boxing, unboxing is old and needs to be rewritten.
kursjan
parents:
923
diff
changeset
|
187 |
"/ |args numArgs javaMethod sel retVal m| |
8452984ed807
New Implementation of JavaLookup. Slow, no boxing, unboxing is old and needs to be rewritten.
kursjan
parents:
923
diff
changeset
|
188 |
"/ |
8452984ed807
New Implementation of JavaLookup. Slow, no boxing, unboxing is old and needs to be rewritten.
kursjan
parents:
923
diff
changeset
|
189 |
"/ args := aMessage arguments. |
8452984ed807
New Implementation of JavaLookup. Slow, no boxing, unboxing is old and needs to be rewritten.
kursjan
parents:
923
diff
changeset
|
190 |
"/ numArgs := args size. |
8452984ed807
New Implementation of JavaLookup. Slow, no boxing, unboxing is old and needs to be rewritten.
kursjan
parents:
923
diff
changeset
|
191 |
"/ sel := aMessage selector. |
8452984ed807
New Implementation of JavaLookup. Slow, no boxing, unboxing is old and needs to be rewritten.
kursjan
parents:
923
diff
changeset
|
192 |
"/ |
8452984ed807
New Implementation of JavaLookup. Slow, no boxing, unboxing is old and needs to be rewritten.
kursjan
parents:
923
diff
changeset
|
193 |
"/ javaMethod := JavaClass lookupMethod:sel numArgs:numArgs in:self class static:false. |
8452984ed807
New Implementation of JavaLookup. Slow, no boxing, unboxing is old and needs to be rewritten.
kursjan
parents:
923
diff
changeset
|
194 |
"/ javaMethod notNil ifTrue:[ |
8452984ed807
New Implementation of JavaLookup. Slow, no boxing, unboxing is old and needs to be rewritten.
kursjan
parents:
923
diff
changeset
|
195 |
"/ args notNil ifTrue:[ |
8452984ed807
New Implementation of JavaLookup. Slow, no boxing, unboxing is old and needs to be rewritten.
kursjan
parents:
923
diff
changeset
|
196 |
"/ args := JavaClass |
8452984ed807
New Implementation of JavaLookup. Slow, no boxing, unboxing is old and needs to be rewritten.
kursjan
parents:
923
diff
changeset
|
197 |
"/ convertArgsToJava:args |
8452984ed807
New Implementation of JavaLookup. Slow, no boxing, unboxing is old and needs to be rewritten.
kursjan
parents:
923
diff
changeset
|
198 |
"/ asSpecifiedIn:(javaMethod argSignature) |
8452984ed807
New Implementation of JavaLookup. Slow, no boxing, unboxing is old and needs to be rewritten.
kursjan
parents:
923
diff
changeset
|
199 |
"/ numArgs:numArgs. |
8452984ed807
New Implementation of JavaLookup. Slow, no boxing, unboxing is old and needs to be rewritten.
kursjan
parents:
923
diff
changeset
|
200 |
"/ ]. |
8452984ed807
New Implementation of JavaLookup. Slow, no boxing, unboxing is old and needs to be rewritten.
kursjan
parents:
923
diff
changeset
|
201 |
"/ javaMethod isWrapped ifTrue:[ |
8452984ed807
New Implementation of JavaLookup. Slow, no boxing, unboxing is old and needs to be rewritten.
kursjan
parents:
923
diff
changeset
|
202 |
"/ m := javaMethod originalMethod |
8452984ed807
New Implementation of JavaLookup. Slow, no boxing, unboxing is old and needs to be rewritten.
kursjan
parents:
923
diff
changeset
|
203 |
"/ ] ifFalse:[ |
8452984ed807
New Implementation of JavaLookup. Slow, no boxing, unboxing is old and needs to be rewritten.
kursjan
parents:
923
diff
changeset
|
204 |
"/ m := javaMethod |
8452984ed807
New Implementation of JavaLookup. Slow, no boxing, unboxing is old and needs to be rewritten.
kursjan
parents:
923
diff
changeset
|
205 |
"/ ]. |
8452984ed807
New Implementation of JavaLookup. Slow, no boxing, unboxing is old and needs to be rewritten.
kursjan
parents:
923
diff
changeset
|
206 |
"/ retVal := javaMethod |
8452984ed807
New Implementation of JavaLookup. Slow, no boxing, unboxing is old and needs to be rewritten.
kursjan
parents:
923
diff
changeset
|
207 |
"/ valueWithReceiver:self |
8452984ed807
New Implementation of JavaLookup. Slow, no boxing, unboxing is old and needs to be rewritten.
kursjan
parents:
923
diff
changeset
|
208 |
"/ arguments:args |
8452984ed807
New Implementation of JavaLookup. Slow, no boxing, unboxing is old and needs to be rewritten.
kursjan
parents:
923
diff
changeset
|
209 |
"/ selector:m selector |
8452984ed807
New Implementation of JavaLookup. Slow, no boxing, unboxing is old and needs to be rewritten.
kursjan
parents:
923
diff
changeset
|
210 |
"/ search:m javaClass |
8452984ed807
New Implementation of JavaLookup. Slow, no boxing, unboxing is old and needs to be rewritten.
kursjan
parents:
923
diff
changeset
|
211 |
"/ sender:nil. |
8452984ed807
New Implementation of JavaLookup. Slow, no boxing, unboxing is old and needs to be rewritten.
kursjan
parents:
923
diff
changeset
|
212 |
"/ |
8452984ed807
New Implementation of JavaLookup. Slow, no boxing, unboxing is old and needs to be rewritten.
kursjan
parents:
923
diff
changeset
|
213 |
"/ ^ JavaClass convertToSmalltalk:retVal type:(m returnType). |
8452984ed807
New Implementation of JavaLookup. Slow, no boxing, unboxing is old and needs to be rewritten.
kursjan
parents:
923
diff
changeset
|
214 |
"/ ]. |
8452984ed807
New Implementation of JavaLookup. Slow, no boxing, unboxing is old and needs to be rewritten.
kursjan
parents:
923
diff
changeset
|
215 |
"/ ^ super doesNotUnderstand:aMessage |
752 | 216 |
|
949
8452984ed807
New Implementation of JavaLookup. Slow, no boxing, unboxing is old and needs to be rewritten.
kursjan
parents:
923
diff
changeset
|
217 |
"Modified: / 16-11-1998 / 16:50:56 / cg" |
1001 | 218 |
"Modified: / 19-09-2011 / 23:43:56 / Jan Kurs <kursjan@fit.cvut.cz>" |
752 | 219 |
! ! |
220 |
||
221 |
!JavaObject methodsFor:'printing & storing'! |
|
222 |
||
223 |
displayString |
|
224 |
||
1213
fc90769151e8
- fix in reflection over methods (signature is nil for non-generic methods)
vranyj1
parents:
1209
diff
changeset
|
225 |
^String streamContents:[:s|self basicPrintOn: s]. |
fc90769151e8
- fix in reflection over methods (signature is nil for non-generic methods)
vranyj1
parents:
1209
diff
changeset
|
226 |
|
1209 | 227 |
JavaVM booted ifTrue:[ |
228 |
| toString | |
|
229 |
[ toString := Java as_ST_String:(self perform:#'toString()Ljava/lang/String;').] |
|
230 |
on: Error do: [ toString := nil ]. |
|
231 |
toString notNil ifTrue:[ |
|
232 |
^toString |
|
233 |
] |
|
752 | 234 |
]. |
235 |
||
236 |
"Modified: / 04-11-1998 / 18:35:00 / cg" |
|
237 |
"Modified: / 28-01-2011 / 15:10:05 / Marcel Hlopko <hlopik@gmail.com>" |
|
1213
fc90769151e8
- fix in reflection over methods (signature is nil for non-generic methods)
vranyj1
parents:
1209
diff
changeset
|
238 |
"Modified: / 04-12-2011 / 20:16:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
752 | 239 |
! |
240 |
||
1209 | 241 |
printOn: aStream |
242 |
|myClassName | |
|
752 | 243 |
|
1209 | 244 |
myClassName := self class name. |
245 |
myClassName == #'java/lang/String' ifTrue:[ |
|
246 |
aStream nextPut:$". |
|
247 |
aStream nextPutAll: (Java as_ST_String: self). |
|
248 |
aStream nextPut:$". |
|
249 |
^self. |
|
752 | 250 |
]. |
1209 | 251 |
myClassName == #'java/lang/Class' ifTrue:[ |
252 |
super printOn: aStream. |
|
253 |
aStream nextPut: $(. |
|
254 |
(JavaVM reflection classForJavaClassObject:self) javaName printOn: aStream. |
|
255 |
aStream nextPut: $). |
|
256 |
^self. |
|
752 | 257 |
]. |
1209 | 258 |
myClassName == #'java.lang.reflect.Method' ifTrue:[ |
259 |
super printOn: aStream. |
|
260 |
aStream nextPut: $(. |
|
261 |
(JavaVM reflection methodForJavaMethodObject:self) printOn: aStream. |
|
262 |
aStream nextPut: $). |
|
263 |
^self. |
|
752 | 264 |
]. |
265 |
||
1209 | 266 |
JavaVM booted ifTrue:[ |
267 |
| toString | |
|
268 |
[ toString := Java as_ST_String:(self perform:#'toString()Ljava/lang/String;').] |
|
269 |
on: Error do: [ toString := nil ]. |
|
270 |
toString notNil ifTrue:[ |
|
271 |
"/super printOn: aStream. |
|
272 |
"/aStream nextPut: $(. |
|
273 |
aStream nextPutAll: toString. |
|
274 |
"/aStream nextPut: $). |
|
275 |
^self. |
|
276 |
] |
|
277 |
]. |
|
278 |
super printOn: aStream. |
|
279 |
||
280 |
"Created: / 04-12-2011 / 10:29:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
752 | 281 |
! ! |
282 |
||
283 |
!JavaObject methodsFor:'queries'! |
|
284 |
||
285 |
isJavaClassRef |
|
286 |
^ false |
|
287 |
||
288 |
"Created: / 9.11.1999 / 17:13:37 / cg" |
|
289 |
! |
|
290 |
||
291 |
isJavaMethodRef |
|
292 |
^ false |
|
293 |
||
294 |
"Created: / 9.11.1999 / 15:43:21 / cg" |
|
295 |
! |
|
296 |
||
297 |
isJavaObject |
|
298 |
^ true |
|
299 |
||
300 |
"Created: 26.3.1997 / 13:34:17 / cg" |
|
301 |
! ! |
|
302 |
||
303 |
!JavaObject methodsFor:'smalltalk interface'! |
|
304 |
||
305 |
lookupMethod:selector numArgs:nargs |
|
306 |
"lookup a method" |
|
307 |
||
308 |
|method cls sel| |
|
309 |
||
310 |
sel := selector. |
|
311 |
(sel includes:$:) ifTrue:[ |
|
312 |
sel := sel copyTo:(sel indexOf:$:)-1 |
|
313 |
]. |
|
314 |
||
315 |
sel := sel asSymbolIfInterned. |
|
316 |
sel notNil ifTrue:[ |
|
317 |
cls := self class. |
|
318 |
[cls notNil and:[cls ~~ JavaObject]] whileTrue:[ |
|
319 |
cls methodDictionary keysAndValuesDo:[:jSel :aMethod | |
|
320 |
(jSel == sel ) ifTrue:[ |
|
321 |
^ aMethod |
|
322 |
] |
|
323 |
]. |
|
324 |
cls methodDictionary keysAndValuesDo:[:jSel :aMethod | |
|
325 |
(aMethod name = sel |
|
326 |
or:[aMethod signatureNameWithoutReturnType = sel]) ifTrue:[ |
|
327 |
aMethod numArgs == nargs ifTrue:[ |
|
328 |
^ aMethod |
|
329 |
] |
|
330 |
] |
|
331 |
]. |
|
332 |
cls := cls superclass. |
|
333 |
]. |
|
334 |
]. |
|
335 |
||
336 |
^ nil |
|
337 |
||
338 |
" |
|
339 |
|stack| |
|
340 |
||
341 |
stack := (Java at:'java.util.Stack') basicNew. |
|
342 |
stack lookupMethod:#'<init>' numArgs:0. |
|
343 |
" |
|
344 |
" |
|
345 |
|stack| |
|
346 |
||
347 |
stack := (Java at:'java.util.Stack') new. |
|
348 |
stack lookupMethod:#isEmpty numArgs:0. |
|
349 |
" |
|
350 |
" |
|
351 |
|frame| |
|
352 |
||
353 |
frame := (Java at:'java.awt.Frame') new. |
|
354 |
frame lookupMethod:#'<init> (String)' numArgs:1. |
|
355 |
" |
|
356 |
||
357 |
"Modified: 22.3.1997 / 00:56:54 / cg" |
|
358 |
! ! |
|
359 |
||
1093 | 360 |
!JavaObject methodsFor:'unwind'! |
361 |
||
362 |
unwindHandlerInContext: aContext |
|
363 |
"given a context which has been marked for unwind, |
|
364 |
retrieve the handler block. This method is called when ST |
|
365 |
exception raises and stack is unwinding. JavaClass instance |
|
366 |
has an opportunity to clean up monitors" |
|
367 |
||
368 |
^ JavaVM unwindHandlerForJavaContext: aContext. |
|
369 |
||
370 |
"Created: / 08-11-2011 / 12:25:15 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
371 |
! ! |
|
372 |
||
752 | 373 |
!JavaObject class methodsFor:'documentation'! |
374 |
||
375 |
version |
|
1022 | 376 |
^ '$Id$' |
752 | 377 |
! |
378 |
||
379 |
version_SVN |
|
1022 | 380 |
^ '$Id$' |
949
8452984ed807
New Implementation of JavaLookup. Slow, no boxing, unboxing is old and needs to be rewritten.
kursjan
parents:
923
diff
changeset
|
381 |
! ! |