author | cg |
Tue, 12 Aug 1997 00:37:24 +0000 | |
changeset 210 | 6a64bc70270b |
parent 198 | 5543d1079a4a |
child 219 | f3557cce61bf |
permissions | -rw-r--r-- |
1 | 1 |
Object subclass:#JavaClassReader |
91 | 2 |
instanceVariableNames:'inStream msb constants majorVsn minorVsn constNeeds2Slots |
38 | 3 |
constSlot' |
198 | 4 |
classVariableNames:'Verbose Silent AbsolutelySilent LazyClassLoading |
5 |
InvalidClassFormatSignal' |
|
1 | 6 |
poolDictionaries:'' |
7 |
category:'Java-Support' |
|
8 |
! |
|
9 |
||
10 |
||
135 | 11 |
!JavaClassReader class methodsFor:'initialization'! |
1 | 12 |
|
13 |
initialize |
|
198 | 14 |
InvalidClassFormatSignal := Signal new mayProceed:true. |
15 |
InvalidClassFormatSignal notifierString:'class load failure'. |
|
16 |
InvalidClassFormatSignal nameClass:self message:#invalidClassFormatSignal. |
|
17 |
||
91 | 18 |
Verbose := false. |
19 |
Silent := true. |
|
20 |
AbsolutelySilent := false. |
|
21 |
||
22 |
LazyClassLoading := false. "/ true. |
|
29 | 23 |
|
24 |
" |
|
25 |
JavaClassReader initialize |
|
26 |
" |
|
27 |
||
198 | 28 |
"Modified: 3.8.1997 / 18:17:04 / cg" |
29 |
! ! |
|
30 |
||
31 |
!JavaClassReader class methodsFor:'Signal constants'! |
|
32 |
||
33 |
invalidClassFormatSignal |
|
34 |
^ InvalidClassFormatSignal |
|
35 |
||
36 |
"Created: 3.8.1997 / 18:17:21 / cg" |
|
1 | 37 |
! ! |
38 |
||
135 | 39 |
!JavaClassReader class methodsFor:'debugging'! |
1 | 40 |
|
41 |
verbose:aBoolean |
|
42 |
Verbose := aBoolean |
|
43 |
||
44 |
" |
|
67 | 45 |
Java flushClasses. |
1 | 46 |
JavaClassReader verbose:true |
47 |
JavaClassReader verbose:false |
|
48 |
" |
|
49 |
! ! |
|
50 |
||
135 | 51 |
!JavaClassReader class methodsFor:'file reading'! |
1 | 52 |
|
21 | 53 |
loadClass:aClassName |
43 | 54 |
"reads a class, installs and returns it. |
55 |
The classes string constants are resolved & <clinit> is called, |
|
56 |
if it implements it." |
|
21 | 57 |
|
58 |
|rslt| |
|
59 |
||
54 | 60 |
rslt := self loadClassLazy:aClassName ignoring:Set new. |
91 | 61 |
rslt notNil ifTrue:[self postLoadActions]. |
40 | 62 |
|
38 | 63 |
^ rslt |
21 | 64 |
|
65 |
" |
|
66 |
JavaClassReader loadClass:'awt/Component' |
|
67 |
JavaClassReader loadClass:'awt/Button' |
|
68 |
JavaClassReader loadClass:'browser/AddButton' |
|
69 |
||
70 |
JavaClassReader loadClass:'java/lang/Object' |
|
71 |
JavaClassReader loadClass:'java/lang/AbstractMethodError' |
|
72 |
JavaClassReader loadClass:'java/lang/Thread' |
|
73 |
" |
|
74 |
||
75 |
"Created: 15.4.1996 / 14:58:53 / cg" |
|
76 |
! |
|
77 |
||
54 | 78 |
loadClassLazy:aClassName ignoring:classesBeingLoaded |
38 | 79 |
"private helper: |
80 |
reads a class, installs and returns it. |
|
81 |
The class is searched along the ClassPath. |
|
43 | 82 |
|
83 |
This is a partial load (to load other classes): |
|
84 |
- The classes stringConstants are not fixed to be JavaStrings |
|
85 |
(i.e they are still ST-Strings). |
|
86 |
- The class is not initialized." |
|
38 | 87 |
|
91 | 88 |
|rslt clsName cls loadedClass| |
50 | 89 |
|
52 | 90 |
(aClassName endsWith:';') ifTrue:[ |
91 |
('oops - loading of ' , aClassName , ' attempted') printNL. |
|
91 | 92 |
self halt:'should not happen'. |
93 |
^ nil |
|
94 |
]. |
|
95 |
(aClassName endsWith:'[]') ifTrue:[ |
|
96 |
('oops - loading of ' , aClassName , ' attempted') printNL. |
|
97 |
self halt:'should not happen'. |
|
52 | 98 |
^ nil |
99 |
]. |
|
100 |
||
50 | 101 |
clsName := aClassName. |
102 |
(clsName includes:$.) ifTrue:[ |
|
103 |
clsName := clsName copy replaceAll:$. by:$/ |
|
104 |
]. |
|
38 | 105 |
|
91 | 106 |
(classesBeingLoaded notNil and:[classesBeingLoaded includes:clsName]) ifTrue:[ |
54 | 107 |
('oops - recursive load of ' , clsName , ' attempted') printNL. |
91 | 108 |
self halt:'should not happen'. |
54 | 109 |
^ JavaUnresolvedClassConstant fullName:clsName |
110 |
]. |
|
111 |
||
91 | 112 |
(cls := Java at:clsName) notNil ifTrue:[ |
113 |
('oops - ' , clsName , ' is already loaded') printNL. |
|
177 | 114 |
self halt:clsName , ' is already loaded - should not happen'. |
91 | 115 |
^ cls |
116 |
]. |
|
117 |
||
118 |
classesBeingLoaded isNil ifTrue:[ |
|
119 |
loadedClass := Set with:clsName |
|
120 |
] ifFalse:[ |
|
121 |
loadedClass := Set withAll:classesBeingLoaded. |
|
122 |
loadedClass add:clsName. |
|
123 |
]. |
|
54 | 124 |
|
135 | 125 |
Java classPath do:[:path | |
126 |
|nm p| |
|
91 | 127 |
|
135 | 128 |
p := path. |
129 |
(p endsWith:Filename separator) ifFalse:[ |
|
130 |
p := p , (Filename separator asString) |
|
131 |
]. |
|
198 | 132 |
(Array |
133 |
with:clsName |
|
134 |
with:clsName asLowercase |
|
135 |
with:clsName asUppercase) |
|
136 |
do:[:tryName | |
|
137 |
(nm := p , tryName , '.class') asFilename exists ifTrue:[ |
|
138 |
rslt := self loadFileLazy:nm ignoring:loadedClass. |
|
139 |
rslt notNil ifTrue:[^ rslt]. |
|
140 |
]. |
|
91 | 141 |
] |
38 | 142 |
]. |
143 |
||
91 | 144 |
('JAVA: no file found for: ' , clsName) infoPrintCR. |
145 |
^ nil |
|
135 | 146 |
|
210 | 147 |
"Modified: 12.8.1997 / 01:40:29 / cg" |
38 | 148 |
! |
149 |
||
7 | 150 |
loadFile:aFilename |
43 | 151 |
"reads a class from aFilename, installs and returns it. |
152 |
The classes strings are fixed and its class-init function is called." |
|
153 |
||
54 | 154 |
self loadFileLazy:aFilename ignoring:(Set new). |
43 | 155 |
self postLoadActions |
156 |
! |
|
157 |
||
54 | 158 |
loadFileLazy:aFilename ignoring:classesBeingLoaded |
43 | 159 |
"reads a class from aFilename, installs and returns it. |
91 | 160 |
Strings are fixed and classrefs are fixed, |
161 |
but NO no class-init functions are called." |
|
7 | 162 |
|
21 | 163 |
|javaClass pool| |
7 | 164 |
|
54 | 165 |
javaClass := self readFile:aFilename ignoring:classesBeingLoaded. |
7 | 166 |
javaClass notNil ifTrue:[ |
32 | 167 |
Java at:(javaClass fullName asSymbol) put:javaClass. |
21 | 168 |
|
54 | 169 |
classesBeingLoaded remove:javaClass fullName ifAbsent:nil. |
21 | 170 |
|
91 | 171 |
JavaUnresolvedConstant resolveFor:javaClass. |
7 | 172 |
]. |
9 | 173 |
^ javaClass |
7 | 174 |
|
175 |
" |
|
176 |
JavaClassReader loadFile:'/phys/ibm3/hotjava/classes/browser/AddButton.class' |
|
9 | 177 |
|
178 |
'/phys/ibm3/java/lib/java/lang' asFilename |
|
179 |
directoryContents do:[:nm | |
|
180 |
(nm endsWith:'.class') ifTrue:[ |
|
14
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
181 |
('/phys/ibm3/java/lib/java/lang/' , nm) printNL. |
9 | 182 |
JavaClassReader loadFile:'/phys/ibm3/java/lib/java/lang/' , nm |
183 |
] |
|
21 | 184 |
]. |
9 | 185 |
|
14
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
186 |
'/phys/ibm3/java/lib/java/io' asFilename |
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
187 |
directoryContents do:[:nm | |
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
188 |
(nm endsWith:'.class') ifTrue:[ |
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
189 |
('/phys/ibm3/java/lib/java/io/' , nm) printNL. |
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
190 |
JavaClassReader loadFile:'/phys/ibm3/java/lib/java/io/' , nm |
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
191 |
] |
21 | 192 |
]. |
14
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
193 |
|
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
194 |
'/phys/ibm3/java/lib/java/net' asFilename |
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
195 |
directoryContents do:[:nm | |
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
196 |
(nm endsWith:'.class') ifTrue:[ |
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
197 |
('/phys/ibm3/java/lib/java/net/' , nm) printNL. |
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
198 |
JavaClassReader loadFile:'/phys/ibm3/java/lib/java/net/' , nm |
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
199 |
] |
21 | 200 |
]. |
14
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
201 |
|
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
202 |
'/phys/ibm3/java/lib/java/util' asFilename |
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
203 |
directoryContents do:[:nm | |
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
204 |
(nm endsWith:'.class') ifTrue:[ |
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
205 |
('/phys/ibm3/java/lib/java/util/' , nm) printNL. |
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
206 |
JavaClassReader loadFile:'/phys/ibm3/java/lib/java/util/' , nm |
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
207 |
] |
21 | 208 |
]. |
14
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
209 |
|
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
210 |
'/phys/ibm3/java/lib/java/awt' asFilename |
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
211 |
directoryContents do:[:nm | |
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
212 |
(nm endsWith:'.class') ifTrue:[ |
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
213 |
('/phys/ibm3/java/lib/java/awt/' , nm) printNL. |
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
214 |
JavaClassReader loadFile:'/phys/ibm3/java/lib/java/awt/' , nm |
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
215 |
] |
21 | 216 |
]. |
14
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
217 |
|
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
218 |
'/phys/ibm3/java/lib/java/applet' asFilename |
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
219 |
directoryContents do:[:nm | |
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
220 |
(nm endsWith:'.class') ifTrue:[ |
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
221 |
('/phys/ibm3/java/lib/java/applet/' , nm) printNL. |
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
222 |
JavaClassReader loadFile:'/phys/ibm3/java/lib/java/applet/' , nm |
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
223 |
] |
21 | 224 |
]. |
14
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
225 |
|
9 | 226 |
JavaClassReader loadFile:'/phys/ibm3/java/lib/java/lang/AbstractMethodError.class' |
14
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
227 |
JavaClassReader loadFile:'/phys/ibm3/java/lib/java/lang/Thread.class' |
7 | 228 |
" |
229 |
||
230 |
"Created: 15.4.1996 / 14:58:53 / cg" |
|
231 |
! |
|
232 |
||
43 | 233 |
postLoadActions |
234 |
"Resolve all classes' string constants. |
|
235 |
Perform all class initialization functions (of those which are not |
|
236 |
yet initialized)." |
|
237 |
||
91 | 238 |
|classes prevUnresolved newUnresolved| |
43 | 239 |
|
91 | 240 |
"/ need at least java.lang.String, for valid constants |
167 | 241 |
Java java_lang_String isNil ifTrue:[ |
91 | 242 |
self loadClassLazy:'java.lang.String' ignoring:Set new. |
54 | 243 |
]. |
244 |
||
91 | 245 |
LazyClassLoading ifFalse:[ |
246 |
prevUnresolved := nil. |
|
247 |
newUnresolved := JavaUnresolvedConstant unresolvedClassNames asArray. |
|
248 |
[prevUnresolved ~= newUnresolved] whileTrue:[ |
|
249 |
newUnresolved do:[:nextUnresolved | |
|
250 |
(Java at:nextUnresolved) isNil ifTrue:[ "/ could have been loaded in the meantime |
|
251 |
Silent ifFalse:[ |
|
252 |
'loading unresolved: ' print. nextUnresolved printCR. |
|
253 |
]. |
|
254 |
||
255 |
self |
|
256 |
loadClassLazy:nextUnresolved |
|
257 |
ignoring:Set new. |
|
258 |
] |
|
259 |
]. |
|
260 |
prevUnresolved := newUnresolved. |
|
261 |
newUnresolved := JavaUnresolvedConstant unresolvedClassNames asArray. |
|
262 |
]. |
|
263 |
||
264 |
newUnresolved size == 0 ifTrue:[ |
|
265 |
"/ nothing unresolved |
|
266 |
||
267 |
(classes := Java allClasses) notNil ifTrue:[ |
|
268 |
"/ init all new classes |
|
269 |
"/ fetch again - there could be new ones ... |
|
270 |
||
271 |
classes := Java allClasses. |
|
272 |
classes do:[:aJavaClass | |
|
273 |
aJavaClass isInitialized ifFalse:[ |
|
274 |
Silent ifFalse:[ |
|
275 |
'performing class initialization of ' print. aJavaClass fullName printCR. |
|
276 |
]. |
|
277 |
aJavaClass classInit |
|
278 |
] |
|
279 |
] |
|
280 |
] |
|
281 |
]. |
|
43 | 282 |
] |
167 | 283 |
|
284 |
"Modified: 26.3.1997 / 13:43:45 / cg" |
|
43 | 285 |
! |
286 |
||
54 | 287 |
readFile:aFilename ignoring:classesBeingLoaded |
7 | 288 |
"reads a class from aFilename and returns it. |
91 | 289 |
The JavaClass is NOT installed as global and unresolved |
290 |
refs are NOT patched." |
|
7 | 291 |
|
73 | 292 |
|inStream javaClass| |
1 | 293 |
|
43 | 294 |
Silent ifFalse:[ |
295 |
'reading ' print. aFilename print. ' ...' printNL. |
|
296 |
]. |
|
21 | 297 |
|
1 | 298 |
inStream := aFilename asFilename readStream. |
91 | 299 |
inStream isNil ifTrue:[ |
300 |
('no file: ' , aFilename) printCR. |
|
301 |
self halt. |
|
302 |
^ nil |
|
303 |
]. |
|
304 |
||
305 |
javaClass := self new readStream:inStream ignoring:classesBeingLoaded. |
|
73 | 306 |
javaClass notNil ifTrue:[ |
307 |
javaClass setBinaryFilePath:(inStream pathName). |
|
308 |
]. |
|
1 | 309 |
inStream close. |
27 | 310 |
|
91 | 311 |
AbsolutelySilent ifFalse:[ |
73 | 312 |
' ... loaded ' print. javaClass displayString printNL. |
43 | 313 |
]. |
27 | 314 |
|
73 | 315 |
^ javaClass |
1 | 316 |
|
317 |
"Created: 15.4.1996 / 14:58:53 / cg" |
|
318 |
! |
|
319 |
||
198 | 320 |
readStream:aStream |
321 |
"reads a class from aStream and returns it. |
|
322 |
The JavaClass is installed as global" |
|
323 |
||
324 |
|javaClass| |
|
325 |
||
326 |
javaClass := self readStream:aStream ignoring:(Set new). |
|
327 |
javaClass notNil ifTrue:[ |
|
328 |
self postLoadActions. |
|
329 |
Java at:(javaClass fullName asSymbol) put:javaClass. |
|
330 |
||
331 |
JavaUnresolvedConstant resolveFor:javaClass. |
|
332 |
]. |
|
333 |
^ javaClass |
|
334 |
||
335 |
"Modified: 3.8.1997 / 19:48:45 / cg" |
|
336 |
! |
|
337 |
||
54 | 338 |
readStream:aStream ignoring:classesBeingLoaded |
7 | 339 |
"reads a class from aStream and returns it. |
340 |
The JavaClass is not installed as global" |
|
341 |
||
54 | 342 |
^ self new readStream:aStream ignoring:classesBeingLoaded |
1 | 343 |
|
344 |
" |
|
345 |
JavaClassReader readFile:'/phys/ibm3/hotjava/classes/browser/AddButton.class' |
|
346 |
" |
|
347 |
||
348 |
"Modified: 15.4.1996 / 15:01:30 / cg" |
|
349 |
! ! |
|
350 |
||
351 |
!JavaClassReader methodsFor:'file reading'! |
|
352 |
||
54 | 353 |
readClassFileIgnoring:classesbeingLoaded |
7 | 354 |
"reads a class from inStream and returns it. |
38 | 355 |
The JavaClass is not installed as global and its constants |
356 |
(especially strings) may not be fully resolved." |
|
7 | 357 |
|
9 | 358 |
|magic |
38 | 359 |
access_flags this_class this_class_index super_class super_class_index |
360 |
realSuperClass this_class_ref existingSuperClass |
|
40 | 361 |
fields interfaces staticFields nStatic| |
1 | 362 |
|
363 |
"/ |
|
364 |
"/ read magic, determine byte order |
|
365 |
"/ |
|
366 |
msb := true. |
|
128 | 367 |
magic := inStream nextUnsignedLongMSB:msb. |
1 | 368 |
magic = 16rCAFEBABE ifFalse:[ |
369 |
magic = 16rBEBAFECA ifFalse:[ |
|
198 | 370 |
InvalidClassFormatSignal raiseErrorString:'not a java class file'. |
1 | 371 |
^ nil |
372 |
]. |
|
373 |
msb := false. |
|
61 | 374 |
Verbose ifTrue:[Transcript showCR:'file is lsb']. |
1 | 375 |
] ifTrue:[ |
61 | 376 |
Verbose ifTrue:[Transcript showCR:'file is msb']. |
1 | 377 |
]. |
378 |
||
379 |
"/ |
|
380 |
"/ get version |
|
381 |
"/ |
|
128 | 382 |
minorVsn := inStream nextUnsignedShortMSB:msb. |
383 |
majorVsn := inStream nextUnsignedShortMSB:msb. |
|
9 | 384 |
|
99 | 385 |
(majorVsn ~~ 45 or:[minorVsn ~~ 3]) ifTrue:[ |
386 |
Transcript show:'warning this file has version '; show:majorVsn; show:'.'; showCR:minorVsn. |
|
387 |
]. |
|
388 |
||
389 |
Verbose ifTrue:[ |
|
390 |
Transcript show:'version = '; |
|
391 |
show:(majorVsn printString); |
|
392 |
show:'.'; |
|
393 |
showCR:(minorVsn printString). |
|
394 |
]. |
|
1 | 395 |
|
396 |
"/ |
|
397 |
"/ get constant pool |
|
398 |
"/ |
|
399 |
self readConstantPool. |
|
400 |
||
401 |
"/ |
|
402 |
"/ access flags |
|
403 |
"/ |
|
128 | 404 |
access_flags := inStream nextUnsignedShortMSB:msb. |
405 |
this_class_index := inStream nextUnsignedShortMSB:msb. |
|
406 |
super_class_index := inStream nextUnsignedShortMSB:msb. |
|
1 | 407 |
|
14
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
408 |
super_class_index == 0 ifTrue:[ |
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
409 |
super_class := nil |
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
410 |
] ifFalse:[ |
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
411 |
super_class := constants at:super_class_index. |
32 | 412 |
existingSuperClass := Java classNamed:super_class fullName. |
21 | 413 |
existingSuperClass notNil ifTrue:[ |
414 |
super_class := existingSuperClass |
|
54 | 415 |
] ifFalse:[ |
416 |
(super_class isMemberOf:JavaUnresolvedClassConstant) ifTrue:[ |
|
91 | 417 |
Silent ifFalse:[ |
418 |
'load superClass: ' print. super_class fullName printCR. |
|
54 | 419 |
]. |
91 | 420 |
|
421 |
existingSuperClass := self class |
|
422 |
loadClassLazy:(super_class fullName) |
|
423 |
ignoring:classesbeingLoaded. |
|
424 |
||
72 | 425 |
existingSuperClass isNil ifTrue:[ |
54 | 426 |
self halt:('cannot find superclass: ' , super_class fullName). |
72 | 427 |
]. |
428 |
super_class := existingSuperClass |
|
91 | 429 |
] ifFalse:[ |
430 |
self halt:'oops - superclass ?' |
|
431 |
] |
|
29 | 432 |
]. |
14
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
433 |
]. |
1 | 434 |
|
435 |
"/ |
|
436 |
"/ get interfaces |
|
437 |
"/ |
|
38 | 438 |
interfaces := self readInterfaces. |
1 | 439 |
|
440 |
"/ |
|
441 |
"/ get fields |
|
442 |
"/ |
|
38 | 443 |
fields := self readFieldInfofields. |
40 | 444 |
|
445 |
"/ |
|
446 |
"/ create the fields as instVars |
|
447 |
"/ static fields are created as class-InstVars |
|
448 |
"/ |
|
449 |
staticFields := fields select:[:f | f isStatic]. |
|
450 |
nStatic := staticFields size. |
|
451 |
||
452 |
this_class_ref := constants at:this_class_index. |
|
182 | 453 |
this_class := JavaClass fullName:(this_class_ref fullName) numStatic:nStatic. |
454 |
||
40 | 455 |
nStatic ~~ 0 ifTrue:[ |
456 |
fields := fields select:[:f | f isStatic not]. |
|
457 |
||
458 |
JavaClass setInstanceVariableStringFromFields:staticFields in:this_class class. |
|
59 | 459 |
this_class setStaticFields:staticFields. |
60 | 460 |
this_class initializeStaticFields. |
40 | 461 |
]. |
462 |
||
463 |
this_class setAccessFlags:access_flags. |
|
464 |
this_class setSuperclass:super_class. |
|
465 |
this_class setConstantPool:constants. |
|
466 |
||
52 | 467 |
this_class setFields:fields. |
110 | 468 |
this_class setInterfaces:interfaces. |
1 | 469 |
|
470 |
"/ |
|
471 |
"/ get methods |
|
472 |
"/ |
|
38 | 473 |
self readMethodsFor:this_class. |
1 | 474 |
|
5 | 475 |
self readAttributesFor:this_class. |
476 |
||
91 | 477 |
constants owner:this_class. |
478 |
||
5 | 479 |
^ this_class |
480 |
||
1 | 481 |
" |
482 |
JavaClassReader readFile:'/phys/ibm3/hotjava/classes/browser/AddButton.class' |
|
483 |
JavaClassReader readFile:'/phys/ibm3/hotjava/classes/browser/Alignable.class' |
|
9 | 484 |
|
485 |
JavaClassReader verbose:true. |
|
486 |
JavaClassReader readFile:'/phys/ibm3/hotjava/classes/java/lang/ArithmeticException.class' |
|
487 |
JavaClassReader readFile:'/phys/ibm3/java/lib/java/lang/ArithmeticException.class' |
|
1 | 488 |
" |
489 |
||
490 |
"Created: 15.4.1996 / 15:02:47 / cg" |
|
198 | 491 |
"Modified: 3.8.1997 / 18:18:56 / cg" |
1 | 492 |
! |
493 |
||
5 | 494 |
readSourceFileAttributeFor:aJavaClass |
495 |
|attribute_length sourceFile_index sourceFile| |
|
496 |
||
128 | 497 |
attribute_length := inStream nextUnsignedLongMSB:msb. |
5 | 498 |
|
128 | 499 |
sourceFile_index := inStream nextUnsignedShortMSB:msb. |
5 | 500 |
sourceFile := constants at:sourceFile_index. |
501 |
||
502 |
aJavaClass setSourceFile:sourceFile. |
|
503 |
||
61 | 504 |
Verbose ifTrue:[Transcript show:'sourceFile: '; showCR:sourceFile]. |
5 | 505 |
^ true |
506 |
||
507 |
" |
|
508 |
JavaClassReader readFile:'/phys/ibm3/hotjava/classes/browser/AddButton.class' |
|
509 |
JavaClassReader readFile:'/phys/ibm3/hotjava/classes/browser/Alignable.class' |
|
510 |
" |
|
511 |
||
512 |
"Modified: 15.4.1996 / 15:33:28 / cg" |
|
513 |
"Created: 15.4.1996 / 15:40:17 / cg" |
|
514 |
! |
|
515 |
||
54 | 516 |
readStream:aStream ignoring:classesBeingLoaded |
7 | 517 |
"reads a class from aStream and returns it. |
518 |
The JavaClass is not installed as global" |
|
519 |
||
5 | 520 |
inStream := aStream. |
521 |
inStream binary. |
|
38 | 522 |
|
54 | 523 |
^ self readClassFileIgnoring:classesBeingLoaded |
5 | 524 |
|
525 |
" |
|
526 |
JavaClassReader readFile:'/phys/ibm3/hotjava/classes/browser/AddButton.class' |
|
527 |
" |
|
528 |
||
529 |
"Created: 15.4.1996 / 15:00:55 / cg" |
|
530 |
"Modified: 15.4.1996 / 15:06:18 / cg" |
|
531 |
! ! |
|
532 |
||
533 |
!JavaClassReader methodsFor:'file reading - attributes'! |
|
534 |
||
535 |
readAttribute:attributeName for:something |
|
83 | 536 |
|
5 | 537 |
(attributeName = 'Code') ifTrue:[ |
538 |
self readCodeAttributeFor:something. |
|
539 |
^ true. |
|
540 |
]. |
|
83 | 541 |
(attributeName = 'Exceptions') ifTrue:[ |
542 |
self readExceptionsAttributeFor:something. |
|
543 |
^ true. |
|
544 |
]. |
|
5 | 545 |
(attributeName = 'LineNumberTable') ifTrue:[ |
546 |
self readLineNumberTableAttributeFor:something. |
|
547 |
^ true. |
|
548 |
]. |
|
549 |
(attributeName = 'LocalVariableTable') ifTrue:[ |
|
550 |
self readLocalVariableTableAttributeFor:something. |
|
551 |
^ true. |
|
552 |
]. |
|
553 |
(attributeName = 'ConstantValue') ifTrue:[ |
|
554 |
self readConstantValueAttributeFor:something. |
|
555 |
^ true. |
|
556 |
]. |
|
557 |
(attributeName = 'SourceFile') ifTrue:[ |
|
558 |
self readSourceFileAttributeFor:something. |
|
559 |
^ true. |
|
560 |
]. |
|
83 | 561 |
|
562 |
('JAVA: unrecognized attribute: ' , attributeName) infoPrintCR. |
|
5 | 563 |
^ false |
564 |
||
565 |
"Modified: 15.4.1996 / 15:33:28 / cg" |
|
566 |
"Created: 15.4.1996 / 15:40:17 / cg" |
|
567 |
! |
|
568 |
||
569 |
readAttributeFor:something |
|
570 |
|attribute_name_index attribute_name attribute_length attribute_info| |
|
571 |
||
61 | 572 |
Verbose ifTrue:[Transcript show:'attrib at pos: '; showCR:inStream position]. |
9 | 573 |
|
128 | 574 |
attribute_name_index := inStream nextUnsignedShortMSB:msb. |
9 | 575 |
|
576 |
"/ |
|
577 |
"/ UNDOC feature ? |
|
578 |
"/ |
|
579 |
attribute_name_index > constants size ifTrue:[ |
|
580 |
attribute_name_index == 16rb700 ifTrue:[ |
|
581 |
self halt. |
|
582 |
] |
|
583 |
]. |
|
584 |
||
5 | 585 |
attribute_name := constants at:attribute_name_index. |
9 | 586 |
|
61 | 587 |
Verbose ifTrue:[Transcript show:'attrib name: '; showCR:attribute_name]. |
9 | 588 |
|
5 | 589 |
(self readAttribute:attribute_name for:something) ifFalse:[ |
128 | 590 |
attribute_length := inStream nextUnsignedLongMSB:msb. |
5 | 591 |
attribute_info := ByteArray new:(attribute_length). |
592 |
inStream nextBytes:attribute_length into:attribute_info startingAt:1. |
|
593 |
||
61 | 594 |
Verbose ifTrue:[Transcript show:'skipped '; show:attribute_name; showCR:'-attribute']. |
5 | 595 |
]. |
596 |
||
597 |
" |
|
598 |
JavaClassReader readFile:'/phys/ibm3/hotjava/classes/browser/AddButton.class' |
|
599 |
" |
|
600 |
||
601 |
"Modified: 15.4.1996 / 15:33:28 / cg" |
|
602 |
"Created: 15.4.1996 / 15:40:17 / cg" |
|
603 |
! |
|
604 |
||
605 |
readAttributesFor:something |
|
606 |
|attributes_count| |
|
607 |
||
128 | 608 |
attributes_count := inStream nextUnsignedShortMSB:msb. |
5 | 609 |
|
610 |
1 to:attributes_count do:[:i | |
|
611 |
self readAttributeFor:something. |
|
612 |
]. |
|
613 |
||
614 |
"Modified: 15.4.1996 / 15:33:28 / cg" |
|
615 |
"Created: 15.4.1996 / 15:40:17 / cg" |
|
616 |
! ! |
|
617 |
||
618 |
!JavaClassReader methodsFor:'file reading - constants'! |
|
619 |
||
1 | 620 |
readConstant |
621 |
|tag constReader const| |
|
622 |
||
623 |
||
11 | 624 |
constNeeds2Slots := false. |
625 |
||
1 | 626 |
"/ |
627 |
"/ get tag |
|
628 |
"/ |
|
128 | 629 |
tag := inStream nextByte. |
61 | 630 |
Verbose ifTrue:[Transcript show:'tag = '; showCR:tag]. |
1 | 631 |
|
632 |
constReader := #( |
|
91 | 633 |
readConstant_Asciz "/ 1 - now called Utf8 |
634 |
readConstant_Unicode "/ 2 |
|
1 | 635 |
readConstant_Integer "/ 3 |
636 |
readConstant_Float "/ 4 |
|
637 |
readConstant_Long "/ 5 |
|
638 |
readConstant_Double "/ 6 |
|
639 |
readConstant_Class "/ 7 |
|
640 |
readConstant_String "/ 8 |
|
641 |
readConstant_Fieldref "/ 9 |
|
642 |
readConstant_Methodref "/ 10 |
|
643 |
readConstant_InterfaceMethodref "/ 11 |
|
91 | 644 |
readConstant_NameAndType "/ 12 |
1 | 645 |
) at:tag ifAbsent:[#readConstant_Undef]. |
646 |
||
647 |
^ self perform:constReader. |
|
648 |
||
649 |
" |
|
650 |
JavaClassReader readFile:'/phys/ibm3/hotjava/classes/browser/AddButton.class' |
|
651 |
" |
|
652 |
||
653 |
"Created: 15.4.1996 / 15:46:32 / cg" |
|
654 |
"Modified: 15.4.1996 / 15:47:00 / cg" |
|
655 |
! |
|
656 |
||
657 |
readConstantPool |
|
11 | 658 |
|constantPoolCount const i| |
1 | 659 |
|
660 |
"/ |
|
661 |
"/ get constant pool |
|
662 |
"/ |
|
128 | 663 |
constantPoolCount := inStream nextUnsignedShortMSB:msb. |
61 | 664 |
Verbose ifTrue:[Transcript show:'constantPoolCount = '; showCR:constantPoolCount]. |
1 | 665 |
|
91 | 666 |
constants := JavaConstantPool "Array" new:constantPoolCount-1. |
1 | 667 |
|
21 | 668 |
constSlot := 1. |
669 |
[constSlot < constantPoolCount] whileTrue:[ |
|
61 | 670 |
Verbose ifTrue:[Transcript show:'const: '; showCR:constSlot]. |
1 | 671 |
const := self readConstant. |
21 | 672 |
constants at:constSlot put:const. |
11 | 673 |
constNeeds2Slots ifTrue:[ |
21 | 674 |
constSlot := constSlot + 1. |
11 | 675 |
]. |
21 | 676 |
constSlot := constSlot + 1. |
1 | 677 |
]. |
678 |
||
52 | 679 |
constSlot := -1. |
680 |
||
91 | 681 |
"/ preresolve what can be (especially, strings are resolved here) |
682 |
||
1 | 683 |
1 to:constantPoolCount-1 do:[:i | |
67 | 684 |
|const value| |
1 | 685 |
|
686 |
const := constants at:i. |
|
38 | 687 |
const notNil ifTrue:[ "/ kludge for 2-slot constants (which only take 1 slot in ST/X) |
91 | 688 |
(const isKindOf:JavaUnresolvedConstant) ifTrue:[ |
689 |
value := const preResolve. |
|
690 |
value ~~ const ifTrue:[ |
|
691 |
constants at:i put:value. |
|
692 |
] |
|
693 |
] |
|
11 | 694 |
] |
1 | 695 |
]. |
696 |
||
697 |
" |
|
698 |
JavaClassReader readFile:'/phys/ibm3/hotjava/classes/browser/AddButton.class' |
|
699 |
JavaClassReader readFile:'/phys/ibm3/hotjava/classes/browser/Alignable.class' |
|
700 |
" |
|
701 |
||
702 |
"Created: 15.4.1996 / 15:14:11 / cg" |
|
703 |
"Modified: 15.4.1996 / 16:41:57 / cg" |
|
704 |
! |
|
705 |
||
706 |
readConstant_Asciz |
|
707 |
|len string| |
|
708 |
||
128 | 709 |
len := inStream nextUnsignedShortMSB:msb. |
1 | 710 |
string := String new:len. |
711 |
inStream nextBytes:len into:string startingAt:1. |
|
712 |
||
61 | 713 |
Verbose ifTrue:[Transcript show:'asciz; string= '; showCR:string]. |
1 | 714 |
|
715 |
^ string |
|
716 |
||
717 |
" |
|
718 |
JavaClassReader readFile:'/phys/ibm3/hotjava/classes/browser/AddButton.class' |
|
719 |
JavaClassReader readFile:'/phys/ibm3/hotjava/classes/browser/Alignable.class' |
|
720 |
" |
|
721 |
||
722 |
"Created: 15.4.1996 / 15:15:35 / cg" |
|
723 |
"Modified: 15.4.1996 / 16:33:45 / cg" |
|
724 |
! |
|
725 |
||
726 |
readConstant_Class |
|
52 | 727 |
|name_index name| |
1 | 728 |
|
128 | 729 |
name_index := inStream nextUnsignedShortMSB:msb. |
1 | 730 |
|
61 | 731 |
Verbose ifTrue:[Transcript show:'class; index= '; showCR:name_index]. |
1 | 732 |
|
52 | 733 |
name := constants at:name_index. |
734 |
name notNil ifTrue:[ |
|
193 | 735 |
Verbose ifTrue:[Transcript showCR:'name in constant_class already resolved']. |
736 |
"/ self halt |
|
52 | 737 |
]. |
738 |
||
21 | 739 |
^ JavaUnresolvedClassConstant |
91 | 740 |
pool:constants |
741 |
poolIndex:constSlot |
|
21 | 742 |
nameIndex:name_index |
91 | 743 |
|
1 | 744 |
" |
745 |
JavaClassReader readFile:'/phys/ibm3/hotjava/classes/browser/AddButton.class' |
|
746 |
" |
|
747 |
||
748 |
"Created: 15.4.1996 / 15:21:13 / cg" |
|
193 | 749 |
"Modified: 1.8.1997 / 21:27:28 / cg" |
1 | 750 |
! |
751 |
||
11 | 752 |
readConstant_Double |
753 |
|high low aFloat| |
|
754 |
||
128 | 755 |
high := inStream nextUnsignedLongMSB:msb. |
756 |
low := inStream nextUnsignedLongMSB:msb. |
|
11 | 757 |
|
758 |
aFloat := Float new. |
|
759 |
UninterpretedBytes isBigEndian ifTrue:[ |
|
760 |
aFloat basicAt:1 put:((high bitShift:-24) bitAnd:16rFF). |
|
761 |
aFloat basicAt:2 put:((high bitShift:-16) bitAnd:16rFF). |
|
762 |
aFloat basicAt:3 put:((high bitShift:-8) bitAnd:16rFF). |
|
763 |
aFloat basicAt:4 put:(high bitAnd:16rFF). |
|
764 |
aFloat basicAt:5 put:((low bitShift:-24) bitAnd:16rFF). |
|
765 |
aFloat basicAt:6 put:((low bitShift:-16) bitAnd:16rFF). |
|
766 |
aFloat basicAt:7 put:((low bitShift:-8) bitAnd:16rFF). |
|
767 |
aFloat basicAt:8 put:(low bitAnd:16rFF). |
|
768 |
] ifFalse:[ |
|
769 |
aFloat basicAt:1 put:(low bitAnd:16rFF). |
|
770 |
aFloat basicAt:2 put:((low bitShift:-8) bitAnd:16rFF). |
|
771 |
aFloat basicAt:3 put:((low bitShift:-16) bitAnd:16rFF). |
|
772 |
aFloat basicAt:4 put:((low bitShift:-24) bitAnd:16rFF). |
|
773 |
aFloat basicAt:5 put:(high bitAnd:16rFF). |
|
774 |
aFloat basicAt:6 put:((high bitShift:-8) bitAnd:16rFF). |
|
775 |
aFloat basicAt:7 put:((high bitShift:-16) bitAnd:16rFF). |
|
776 |
aFloat basicAt:8 put:((high bitShift:-24) bitAnd:16rFF). |
|
777 |
]. |
|
778 |
||
779 |
constNeeds2Slots := true. |
|
780 |
||
61 | 781 |
Verbose ifTrue:[Transcript show:'double; value= '; showCR:aFloat]. |
11 | 782 |
^ aFloat |
783 |
||
784 |
" |
|
785 |
JavaClassReader readFile:'/phys/ibm3/hotjava/classes/browser/AddButton.class' |
|
786 |
JavaClassReader readFile:'/phys/ibm3/hotjava/classes/browser/Alignable.class' |
|
787 |
" |
|
788 |
||
789 |
"Modified: 15.4.1996 / 15:42:16 / cg" |
|
790 |
"Created: 15.4.1996 / 16:34:42 / cg" |
|
791 |
! |
|
792 |
||
1 | 793 |
readConstant_Fieldref |
794 |
|class_index name_and_type_index| |
|
795 |
||
128 | 796 |
class_index := inStream nextUnsignedShortMSB:msb. |
797 |
name_and_type_index := inStream nextUnsignedShortMSB:msb. |
|
1 | 798 |
|
61 | 799 |
Verbose ifTrue:[Transcript show:'fieldref; classindex= '; showCR:class_index]. |
800 |
Verbose ifTrue:[Transcript show:'fieldref; name&typeindex= '; showCR:name_and_type_index]. |
|
1 | 801 |
|
91 | 802 |
^ JavaUnresolvedFieldrefConstant |
803 |
pool:constants |
|
804 |
poolIndex:constSlot |
|
1 | 805 |
classIndex:class_index |
806 |
nameandTypeIndex:name_and_type_index |
|
807 |
||
808 |
" |
|
809 |
JavaClassReader readFile:'/phys/ibm3/hotjava/classes/browser/AddButton.class' |
|
810 |
" |
|
811 |
||
812 |
"Created: 15.4.1996 / 15:22:18 / cg" |
|
813 |
"Modified: 15.4.1996 / 16:07:01 / cg" |
|
814 |
! |
|
815 |
||
11 | 816 |
readConstant_Float |
817 |
|high aFloat| |
|
818 |
||
128 | 819 |
high := inStream nextUnsignedLongMSB:msb. |
11 | 820 |
|
821 |
aFloat := ShortFloat basicNew. |
|
822 |
UninterpretedBytes isBigEndian ifTrue:[ |
|
823 |
aFloat basicAt:1 put:((high bitShift:-24) bitAnd:16rFF). |
|
824 |
aFloat basicAt:2 put:((high bitShift:-16) bitAnd:16rFF). |
|
825 |
aFloat basicAt:3 put:((high bitShift:-8) bitAnd:16rFF). |
|
826 |
aFloat basicAt:4 put:(high bitAnd:16rFF). |
|
827 |
] ifFalse:[ |
|
14
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
828 |
aFloat basicAt:1 put:(high bitAnd:16rFF). |
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
829 |
aFloat basicAt:2 put:((high bitShift:-8) bitAnd:16rFF). |
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
830 |
aFloat basicAt:3 put:((high bitShift:-16) bitAnd:16rFF). |
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
831 |
aFloat basicAt:4 put:((high bitShift:-24) bitAnd:16rFF). |
11 | 832 |
]. |
833 |
||
61 | 834 |
Verbose ifTrue:[Transcript show:'float; value= '; showCR:aFloat]. |
11 | 835 |
^ aFloat |
836 |
||
837 |
" |
|
838 |
JavaClassReader readFile:'/phys/ibm3/hotjava/classes/browser/AddButton.class' |
|
839 |
JavaClassReader readFile:'/phys/ibm3/hotjava/classes/browser/Alignable.class' |
|
840 |
" |
|
841 |
||
842 |
"Modified: 15.4.1996 / 15:42:16 / cg" |
|
843 |
"Created: 15.4.1996 / 16:34:42 / cg" |
|
844 |
! |
|
845 |
||
1 | 846 |
readConstant_Integer |
847 |
|value| |
|
848 |
||
128 | 849 |
value := inStream nextLongMSB:msb. |
1 | 850 |
|
61 | 851 |
Verbose ifTrue:[Transcript show:'integer; value= '; showCR:value]. |
1 | 852 |
|
853 |
^ value |
|
854 |
||
855 |
" |
|
856 |
JavaClassReader readFile:'/phys/ibm3/hotjava/classes/browser/AddButton.class' |
|
857 |
JavaClassReader readFile:'/phys/ibm3/hotjava/classes/browser/Alignable.class' |
|
858 |
" |
|
859 |
||
860 |
"Modified: 15.4.1996 / 15:42:16 / cg" |
|
861 |
"Created: 15.4.1996 / 16:34:42 / cg" |
|
862 |
! |
|
863 |
||
14
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
864 |
readConstant_InterfaceMethodref |
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
865 |
|class_index name_and_type_index| |
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
866 |
|
128 | 867 |
class_index := inStream nextUnsignedShortMSB:msb. |
868 |
name_and_type_index := inStream nextUnsignedShortMSB:msb. |
|
14
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
869 |
|
61 | 870 |
Verbose ifTrue:[Transcript show:'methodref; classindex= '; showCR:class_index]. |
871 |
Verbose ifTrue:[Transcript show:'methodref; name&typeindex= '; showCR:name_and_type_index]. |
|
14
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
872 |
|
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
873 |
^ JavaUnresolvedInterfaceMethodrefConstant |
91 | 874 |
pool:constants |
875 |
poolIndex:constSlot |
|
14
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
876 |
classIndex:class_index |
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
877 |
nameandTypeIndex:name_and_type_index |
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
878 |
|
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
879 |
" |
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
880 |
JavaClassReader readFile:'/phys/ibm3/hotjava/classes/browser/AddButton.class' |
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
881 |
" |
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
882 |
|
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
883 |
"Created: 15.4.1996 / 15:22:37 / cg" |
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
884 |
"Modified: 15.4.1996 / 16:07:19 / cg" |
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
885 |
! |
c1d9f60eb650
can now load all java.class files (see JavaClassReader>>loadFile:)
cg
parents:
11
diff
changeset
|
886 |
|
11 | 887 |
readConstant_Long |
888 |
|high low value| |
|
889 |
||
128 | 890 |
high := inStream nextUnsignedLongMSB:msb. |
891 |
low := inStream nextUnsignedLongMSB:msb. |
|
11 | 892 |
|
893 |
value := (high bitShift:32) bitOr:low. |
|
60 | 894 |
(high bitTest:16r80000000) ifTrue:[ |
895 |
value := value - 16r10000000000000000. |
|
896 |
]. |
|
11 | 897 |
constNeeds2Slots := true. |
898 |
||
61 | 899 |
Verbose ifTrue:[Transcript show:'long; value= '; showCR:value]. |
11 | 900 |
^ value |
901 |
||
902 |
" |
|
903 |
JavaClassReader readFile:'/phys/ibm3/hotjava/classes/browser/AddButton.class' |
|
904 |
JavaClassReader readFile:'/phys/ibm3/hotjava/classes/browser/Alignable.class' |
|
905 |
" |
|
906 |
||
907 |
"Modified: 15.4.1996 / 15:42:16 / cg" |
|
908 |
"Created: 15.4.1996 / 16:34:42 / cg" |
|
909 |
! |
|
910 |
||
1 | 911 |
readConstant_Methodref |
912 |
|class_index name_and_type_index| |
|
913 |
||
128 | 914 |
class_index := inStream nextUnsignedShortMSB:msb. |
915 |
name_and_type_index := inStream nextUnsignedShortMSB:msb. |
|
1 | 916 |
|
61 | 917 |
Verbose ifTrue:[Transcript show:'methodref; classindex= '; showCR:class_index]. |
918 |
Verbose ifTrue:[Transcript show:'methodref; name&typeindex= '; showCR:name_and_type_index]. |
|
1 | 919 |
|
920 |
^ JavaUnresolvedMethodrefConstant |
|
91 | 921 |
pool:constants |
922 |
poolIndex:constSlot |
|
1 | 923 |
classIndex:class_index |
924 |
nameandTypeIndex:name_and_type_index |
|
925 |
||
926 |
" |
|
927 |
JavaClassReader readFile:'/phys/ibm3/hotjava/classes/browser/AddButton.class' |
|
928 |
" |
|
929 |
||
930 |
"Created: 15.4.1996 / 15:22:37 / cg" |
|
931 |
"Modified: 15.4.1996 / 16:07:19 / cg" |
|
932 |
! |
|
933 |
||
91 | 934 |
readConstant_NameAndType |
1 | 935 |
|name_index signature_index| |
936 |
||
128 | 937 |
name_index := inStream nextUnsignedShortMSB:msb. |
938 |
signature_index := inStream nextUnsignedShortMSB:msb. |
|
1 | 939 |
|
61 | 940 |
Verbose ifTrue:[Transcript show:'methodref; nameindex= '; showCR:name_index]. |
941 |
Verbose ifTrue:[Transcript show:'methodref; signatureindex= '; showCR:signature_index]. |
|
1 | 942 |
|
943 |
^ JavaUnresolvedNameandTypeConstant |
|
91 | 944 |
pool:constants |
945 |
poolIndex:constSlot |
|
1 | 946 |
nameIndex:name_index |
91 | 947 |
signatureIndex:signature_index |
1 | 948 |
|
949 |
" |
|
950 |
JavaClassReader readFile:'/phys/ibm3/hotjava/classes/browser/AddButton.class' |
|
951 |
" |
|
952 |
||
953 |
"Created: 15.4.1996 / 15:23:43 / cg" |
|
954 |
"Modified: 15.4.1996 / 16:17:16 / cg" |
|
955 |
! |
|
956 |
||
957 |
readConstant_String |
|
958 |
|tag string_index| |
|
959 |
||
128 | 960 |
string_index := inStream nextUnsignedShortMSB:msb. |
1 | 961 |
|
61 | 962 |
Verbose ifTrue:[Transcript show:'string; index= '; showCR:string_index]. |
1 | 963 |
|
91 | 964 |
^ JavaUnresolvedStringConstant |
965 |
pool:constants |
|
966 |
poolIndex:constSlot |
|
967 |
stringIndex:string_index |
|
1 | 968 |
|
969 |
" |
|
43 | 970 |
Verbose := true. |
971 |
JavaClassReader readFile:'/phys/ibm3/java/lib/java/lang/System.class' |
|
1 | 972 |
" |
973 |
||
974 |
"Created: 15.4.1996 / 15:20:33 / cg" |
|
975 |
"Modified: 15.4.1996 / 16:01:37 / cg" |
|
5 | 976 |
! ! |
977 |
||
978 |
!JavaClassReader methodsFor:'file reading - fields'! |
|
979 |
||
980 |
readConstantValueAttributeFor:aField |
|
981 |
|attribute_length constantvalue_index constantValue| |
|
982 |
||
128 | 983 |
attribute_length := inStream nextUnsignedLongMSB:msb. |
5 | 984 |
|
128 | 985 |
constantvalue_index := inStream nextUnsignedShortMSB:msb. |
5 | 986 |
constantValue := constants at:constantvalue_index. |
987 |
||
59 | 988 |
aField constantValue:constantValue. |
989 |
||
61 | 990 |
Verbose ifTrue:[Transcript show:'constantValue: '; showCR:constantValue]. |
5 | 991 |
^ true |
992 |
||
993 |
" |
|
994 |
JavaClassReader readFile:'/phys/ibm3/hotjava/classes/browser/AddButton.class' |
|
995 |
JavaClassReader readFile:'/phys/ibm3/hotjava/classes/browser/Alignable.class' |
|
996 |
" |
|
997 |
||
998 |
"Modified: 15.4.1996 / 15:33:28 / cg" |
|
999 |
"Created: 15.4.1996 / 15:40:17 / cg" |
|
1 | 1000 |
! |
1001 |
||
1002 |
readFieldInfofield |
|
5 | 1003 |
|access_flags name_index signature_index attributes_count field| |
1 | 1004 |
|
128 | 1005 |
access_flags := inStream nextUnsignedShortMSB:msb. |
1006 |
name_index := inStream nextUnsignedShortMSB:msb. |
|
1007 |
signature_index := inStream nextUnsignedShortMSB:msb. |
|
5 | 1008 |
|
1009 |
field := JavaField new. |
|
1010 |
field setAccessFlags:access_flags. |
|
1011 |
field setName:(constants at:name_index). |
|
1012 |
field setSignature:(constants at:signature_index). |
|
1013 |
||
128 | 1014 |
attributes_count := inStream nextUnsignedShortMSB:msb. |
1 | 1015 |
|
99 | 1016 |
Verbose ifTrue:[Transcript show:' field name: '; show:(constants at:name_index); |
1017 |
show:' access: '; show:access_flags; |
|
1018 |
show:' attrib_cnt: '; showCR:attributes_count]. |
|
1019 |
||
1 | 1020 |
1 to:attributes_count do:[:i | |
5 | 1021 |
self readAttributeFor:field. |
1 | 1022 |
]. |
1023 |
||
27 | 1024 |
^ field |
1025 |
||
1 | 1026 |
" |
1027 |
JavaClassReader readFile:'/phys/ibm3/hotjava/classes/browser/AddButton.class' |
|
1028 |
" |
|
1029 |
||
1030 |
"Modified: 15.4.1996 / 15:33:28 / cg" |
|
1031 |
"Created: 15.4.1996 / 15:38:43 / cg" |
|
1032 |
! |
|
1033 |
||
1034 |
readFieldInfofields |
|
38 | 1035 |
|nFields fields| |
1 | 1036 |
|
1037 |
"/ |
|
38 | 1038 |
"/ get fieldInfos |
1 | 1039 |
"/ |
128 | 1040 |
nFields := inStream nextUnsignedShortMSB:msb. |
61 | 1041 |
Verbose ifTrue:[Transcript show:'fieldsCount = '; showCR:nFields]. |
1 | 1042 |
|
27 | 1043 |
fields := Array new:nFields. |
1044 |
||
1045 |
1 to:nFields do:[:i | |
|
61 | 1046 |
Verbose ifTrue:[Transcript show:'field: '; showCR:i]. |
27 | 1047 |
fields at:i put:(self readFieldInfofield) |
1 | 1048 |
]. |
38 | 1049 |
^ fields |
1 | 1050 |
|
1051 |
" |
|
1052 |
JavaClassReader readFile:'/phys/ibm3/hotjava/classes/browser/AddButton.class' |
|
1053 |
" |
|
1054 |
||
1055 |
"Created: 15.4.1996 / 15:34:41 / cg" |
|
1056 |
"Modified: 15.4.1996 / 15:35:28 / cg" |
|
5 | 1057 |
! ! |
1058 |
||
38 | 1059 |
!JavaClassReader methodsFor:'file reading - interfaces'! |
1060 |
||
1061 |
readInterfaces |
|
110 | 1062 |
|interfacesCount interface_index interface interfaces| |
38 | 1063 |
|
1064 |
"/ |
|
1065 |
"/ get interfaces |
|
1066 |
"/ |
|
128 | 1067 |
interfacesCount := inStream nextUnsignedShortMSB:msb. |
61 | 1068 |
Verbose ifTrue:[Transcript show:'interfacesCount = '; showCR:interfacesCount]. |
38 | 1069 |
|
1070 |
interfaces := Array new:interfacesCount. |
|
1071 |
||
1072 |
1 to:interfacesCount do:[:i | |
|
61 | 1073 |
Verbose ifTrue:[Transcript show:'interface: '; showCR:i]. |
128 | 1074 |
interface_index := inStream nextUnsignedShortMSB:msb. |
110 | 1075 |
interface := constants at:interface_index. |
38 | 1076 |
|
1077 |
interfaces at:i put:interface. |
|
1078 |
]. |
|
1079 |
^ interfaces |
|
1080 |
||
1081 |
" |
|
1082 |
JavaClassReader readFile:'/phys/ibm3/hotjava/classes/browser/AddButton.class' |
|
1083 |
" |
|
1084 |
||
1085 |
"Created: 15.4.1996 / 15:31:59 / cg" |
|
1086 |
"Modified: 15.4.1996 / 15:33:28 / cg" |
|
1087 |
! ! |
|
1088 |
||
5 | 1089 |
!JavaClassReader methodsFor:'file reading - methods'! |
1090 |
||
1091 |
readCodeAttributeFor:aJavaMethod |
|
1092 |
|attribute_length max_stack max_locals code_length code |
|
9 | 1093 |
exception_table_length exception_table unknown1 unknown2| |
1 | 1094 |
|
128 | 1095 |
attribute_length := inStream nextUnsignedLongMSB:msb. |
1 | 1096 |
|
9 | 1097 |
|
61 | 1098 |
Verbose ifTrue:[Transcript show:'attribute_length: 0x'; showCR:(attribute_length printStringRadix:16)]. |
9 | 1099 |
|
99 | 1100 |
minorVsn > 2 ifTrue:[ |
128 | 1101 |
unknown1 := inStream nextByte. |
1102 |
max_stack := inStream nextByte. |
|
1103 |
max_locals := inStream nextUnsignedShortMSB:msb. |
|
1104 |
unknown2 := inStream nextUnsignedShortMSB:msb. |
|
61 | 1105 |
Verbose ifTrue:[Transcript show:'?1: '; showCR:unknown1]. |
1106 |
Verbose ifTrue:[Transcript show:'?2: '; showCR:unknown2]. |
|
39 | 1107 |
] ifFalse:[ |
128 | 1108 |
max_stack := inStream nextByte. |
1109 |
max_locals := inStream nextByte. |
|
9 | 1110 |
]. |
1111 |
||
128 | 1112 |
code_length := inStream nextUnsignedShortMSB:msb. |
61 | 1113 |
Verbose ifTrue:[Transcript show:'code_length: '; showCR:(code_length printStringRadix:16)]. |
1114 |
Verbose ifTrue:[Transcript show:'code at pos: '; showCR:inStream position]. |
|
38 | 1115 |
|
5 | 1116 |
code := ByteArray new:code_length. |
1117 |
inStream nextBytes:code_length into:code startingAt:1. |
|
1 | 1118 |
|
61 | 1119 |
Verbose ifTrue:[Transcript show:'method code:'; showCR:code.]. |
9 | 1120 |
|
128 | 1121 |
exception_table_length := inStream nextUnsignedShortMSB:msb. |
61 | 1122 |
Verbose ifTrue:[Transcript show:'exception_table_length: '; showCR:(exception_table_length printStringRadix:16)]. |
5 | 1123 |
exception_table_length ~~ 0 ifTrue:[ |
61 | 1124 |
Verbose ifTrue:[Transcript show:'exceptionTable length:'; showCR:exception_table_length.]. |
9 | 1125 |
|
5 | 1126 |
exception_table := Array new:exception_table_length. |
1127 |
1 to:exception_table_length do:[:i | |
|
1128 |
|start_pc end_pc handler_pc catch_type| |
|
1 | 1129 |
|
128 | 1130 |
start_pc := inStream nextUnsignedShortMSB:msb. |
1131 |
end_pc := inStream nextUnsignedShortMSB:msb. |
|
1132 |
handler_pc := inStream nextUnsignedShortMSB:msb. |
|
1133 |
catch_type := constants at:(inStream nextUnsignedShortMSB:msb). |
|
5 | 1134 |
exception_table at:i put:(JavaExceptionTableEntry |
1135 |
startPC:start_pc |
|
1136 |
endPC:end_pc |
|
1137 |
handlerPC:handler_pc |
|
1138 |
catchType:catch_type). |
|
1139 |
]. |
|
83 | 1140 |
aJavaMethod setExceptionHandlerTable:exception_table. |
1 | 1141 |
]. |
1142 |
||
29 | 1143 |
aJavaMethod |
1144 |
setCode:code |
|
1145 |
maxStack:max_stack |
|
1146 |
maxLocals:max_locals |
|
1147 |
u1:unknown1 |
|
1148 |
u2:unknown2. |
|
5 | 1149 |
|
1150 |
self readAttributesFor:aJavaMethod. |
|
1151 |
^ true |
|
1152 |
||
1 | 1153 |
" |
1154 |
JavaClassReader readFile:'/phys/ibm3/hotjava/classes/browser/AddButton.class' |
|
5 | 1155 |
JavaClassReader readFile:'/phys/ibm3/hotjava/classes/browser/Alignable.class' |
1 | 1156 |
" |
1157 |
||
1158 |
"Modified: 15.4.1996 / 15:33:28 / cg" |
|
5 | 1159 |
"Created: 15.4.1996 / 15:40:17 / cg" |
1160 |
! |
|
1161 |
||
83 | 1162 |
readExceptionsAttributeFor:aJavaMethod |
1163 |
|attribute_length exception_table_length exception_table| |
|
1164 |
||
128 | 1165 |
attribute_length := inStream nextUnsignedLongMSB:msb. |
83 | 1166 |
|
128 | 1167 |
exception_table_length := inStream nextUnsignedShortMSB:msb. |
83 | 1168 |
exception_table_length ~~ 0 ifTrue:[ |
1169 |
exception_table := Array new:exception_table_length. |
|
1170 |
1 to:exception_table_length do:[:i | |
|
1171 |
|idx ex| |
|
1172 |
||
128 | 1173 |
idx := inStream nextUnsignedShortMSB:msb. |
83 | 1174 |
ex := constants at:idx. |
1175 |
exception_table at:i put:ex. |
|
1176 |
]. |
|
1177 |
]. |
|
1178 |
||
1179 |
Verbose ifTrue:[Transcript showCR:'method has an exceptionTable']. |
|
1180 |
||
1181 |
aJavaMethod setExceptionTable:exception_table. |
|
1182 |
^ true |
|
1183 |
||
1184 |
"Modified: 15.4.1996 / 15:33:28 / cg" |
|
1185 |
"Created: 15.4.1996 / 15:40:17 / cg" |
|
1186 |
! |
|
1187 |
||
5 | 1188 |
readLineNumberTableAttributeFor:aJavaMethod |
1189 |
|attribute_length line_number_table_length line_number_table| |
|
1190 |
||
128 | 1191 |
attribute_length := inStream nextUnsignedLongMSB:msb. |
5 | 1192 |
|
128 | 1193 |
line_number_table_length := inStream nextUnsignedShortMSB:msb. |
5 | 1194 |
line_number_table_length ~~ 0 ifTrue:[ |
1195 |
line_number_table := Array new:line_number_table_length. |
|
1196 |
1 to:line_number_table_length do:[:i | |
|
1197 |
|start_pc line_number| |
|
1198 |
||
128 | 1199 |
start_pc := inStream nextUnsignedShortMSB:msb. |
1200 |
line_number := inStream nextUnsignedShortMSB:msb. |
|
5 | 1201 |
line_number_table at:i put:(start_pc -> line_number). |
1202 |
]. |
|
1203 |
]. |
|
1204 |
||
61 | 1205 |
Verbose ifTrue:[Transcript showCR:'method has a lineNumberTable']. |
9 | 1206 |
|
5 | 1207 |
aJavaMethod setLineNumberTable:line_number_table. |
1208 |
^ true |
|
1209 |
||
1210 |
" |
|
1211 |
JavaClassReader readFile:'/phys/ibm3/hotjava/classes/browser/AddButton.class' |
|
1212 |
JavaClassReader readFile:'/phys/ibm3/hotjava/classes/java/lang/Boolean.class' |
|
1213 |
" |
|
1214 |
||
1215 |
"Modified: 15.4.1996 / 15:33:28 / cg" |
|
1216 |
"Created: 15.4.1996 / 15:40:17 / cg" |
|
1 | 1217 |
! |
1218 |
||
50 | 1219 |
readLocalVariableTableAttributeFor:aJavaMethod |
1220 |
|attribute_length local_variable_table_length local_variable_table| |
|
1221 |
||
128 | 1222 |
attribute_length := inStream nextUnsignedLongMSB:msb. |
50 | 1223 |
|
128 | 1224 |
local_variable_table_length := inStream nextUnsignedShortMSB:msb. |
50 | 1225 |
local_variable_table_length ~~ 0 ifTrue:[ |
104 | 1226 |
local_variable_table := JavaLocalVariableTable new:local_variable_table_length. |
50 | 1227 |
1 to:local_variable_table_length do:[:i | |
1228 |
|start_pc length name_index sig_index slot name signature| |
|
1229 |
||
128 | 1230 |
start_pc := inStream nextUnsignedShortMSB:msb. |
1231 |
length := inStream nextUnsignedShortMSB:msb. |
|
1232 |
name_index := inStream nextUnsignedShortMSB:msb. |
|
86 | 1233 |
name := constants at:name_index. |
128 | 1234 |
sig_index := inStream nextUnsignedShortMSB:msb. |
86 | 1235 |
signature := constants at:sig_index. |
128 | 1236 |
slot := inStream nextUnsignedShortMSB:msb. |
50 | 1237 |
|
1238 |
local_variable_table at:i put:(JavaLocalVariableTableEntry new |
|
1239 |
startPC:start_pc |
|
1240 |
length:length |
|
1241 |
name:name |
|
1242 |
signature:signature |
|
1243 |
slot:slot) |
|
1244 |
]. |
|
1245 |
]. |
|
1246 |
||
61 | 1247 |
Verbose ifTrue:[Transcript showCR:'method has a localvariableTable']. |
50 | 1248 |
|
1249 |
aJavaMethod setLocalVariableTable:local_variable_table. |
|
1250 |
^ true |
|
1251 |
||
1252 |
" |
|
1253 |
JavaClassReader readFile:'/phys/ibm3/hotjava/classes/browser/AddButton.class' |
|
1254 |
JavaClassReader readFile:'/phys/ibm3/hotjava/classes/java/lang/Boolean.class' |
|
1255 |
" |
|
1256 |
||
1257 |
"Modified: 15.4.1996 / 15:33:28 / cg" |
|
1258 |
"Created: 15.4.1996 / 15:40:17 / cg" |
|
1259 |
! |
|
1260 |
||
38 | 1261 |
readMethodFor:aJavaClass |
9 | 1262 |
|m access_flags name_index name signature_index signature| |
1 | 1263 |
|
1264 |
"/ |
|
1265 |
"/ get a method |
|
1266 |
"/ |
|
128 | 1267 |
access_flags := inStream nextUnsignedShortMSB:msb. |
1268 |
name_index := inStream nextUnsignedShortMSB:msb. |
|
1269 |
signature_index := inStream nextUnsignedShortMSB:msb. |
|
1 | 1270 |
|
5 | 1271 |
name := constants at:name_index. |
1272 |
signature := constants at:signature_index. |
|
9 | 1273 |
|
61 | 1274 |
Verbose ifTrue:[Transcript show:'method name:'; showCR:name. |
1275 |
Transcript show:'signature:'; showCR:signature.]. |
|
9 | 1276 |
|
5 | 1277 |
m := JavaMethod new. |
1278 |
m setAccessFlags:access_flags. |
|
1279 |
m setSignature:signature. |
|
1280 |
m setName:name. |
|
38 | 1281 |
m setJavaClass:aJavaClass. |
5 | 1282 |
|
1283 |
self readAttributesFor:m. |
|
1284 |
||
38 | 1285 |
aJavaClass addMethod:m name:name signature:signature. |
1 | 1286 |
|
1287 |
" |
|
1288 |
JavaClassReader readFile:'/phys/ibm3/hotjava/classes/browser/AddButton.class' |
|
1289 |
" |
|
1290 |
||
1291 |
"Modified: 15.4.1996 / 15:33:28 / cg" |
|
1292 |
"Created: 15.4.1996 / 16:48:49 / cg" |
|
1293 |
! |
|
1294 |
||
38 | 1295 |
readMethodsFor:aJavaClass |
1 | 1296 |
|methodsCount method| |
1297 |
||
1298 |
||
1299 |
"/ |
|
1300 |
"/ get methods |
|
1301 |
"/ |
|
128 | 1302 |
methodsCount := inStream nextUnsignedShortMSB:msb. |
61 | 1303 |
Verbose ifTrue:[Transcript show:'methodsCount = '; showCR:methodsCount]. |
1 | 1304 |
|
1305 |
1 to:methodsCount do:[:i | |
|
61 | 1306 |
Verbose ifTrue:[Transcript show:'method: '; showCR:i]. |
38 | 1307 |
method := self readMethodFor:aJavaClass |
1 | 1308 |
]. |
1309 |
||
1310 |
" |
|
1311 |
JavaClassReader readFile:'/phys/ibm3/hotjava/classes/browser/AddButton.class' |
|
1312 |
" |
|
1313 |
||
1314 |
"Modified: 15.4.1996 / 15:33:28 / cg" |
|
1315 |
"Created: 15.4.1996 / 16:46:30 / cg" |
|
1316 |
! ! |
|
1317 |
||
135 | 1318 |
!JavaClassReader class methodsFor:'documentation'! |
1 | 1319 |
|
1320 |
version |
|
210 | 1321 |
^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaClassReader.st,v 1.44 1997/08/12 00:37:11 cg Exp $' |
1 | 1322 |
! ! |
1323 |
JavaClassReader initialize! |