6
|
1 |
Object subclass:#JavaExceptionTableEntry
|
|
2 |
instanceVariableNames:'startPC endPC handlerPC catchType'
|
|
3 |
classVariableNames:''
|
|
4 |
poolDictionaries:''
|
|
5 |
category:'Java-Support'
|
|
6 |
!
|
|
7 |
|
|
8 |
|
91
|
9 |
!JavaExceptionTableEntry class methodsFor:'instance creation'!
|
6
|
10 |
|
|
11 |
startPC:start_pc endPC:end_pc handlerPC:handler_pc catchType:catch_type
|
|
12 |
^ self new startPC:start_pc endPC:end_pc handlerPC:handler_pc catchType:catch_type
|
|
13 |
|
|
14 |
"Created: 16.4.1996 / 12:11:13 / cg"
|
|
15 |
! !
|
|
16 |
|
|
17 |
!JavaExceptionTableEntry methodsFor:'private accessing'!
|
|
18 |
|
47
|
19 |
handlerPCFor:exception at:pc in:aMethod
|
|
20 |
"if there is a handler for exceptionClass, with given pc,
|
|
21 |
return the handler-PC; otherwise, return nil."
|
|
22 |
|
|
23 |
|cls ref|
|
|
24 |
|
|
25 |
(pc between:startPC and:endPC) ifTrue:[
|
|
26 |
catchType == 0 ifTrue:[^ handlerPC].
|
100
|
27 |
cls := aMethod javaClass.
|
47
|
28 |
ref := cls constantPool at:catchType.
|
|
29 |
(ref isKindOf:JavaClass) ifFalse:[
|
|
30 |
self halt.
|
|
31 |
^ nil
|
|
32 |
].
|
|
33 |
(exception class isKindOf:ref) ifTrue:[
|
|
34 |
^ handlerPC
|
|
35 |
].
|
|
36 |
^ nil
|
|
37 |
].
|
|
38 |
^ nil
|
|
39 |
!
|
|
40 |
|
6
|
41 |
startPC:start_pc endPC:end_pc handlerPC:handler_pc catchType:catch_type
|
|
42 |
startPC := start_pc.
|
|
43 |
endPC := end_pc.
|
|
44 |
handlerPC := handler_pc.
|
|
45 |
catchType := catch_type
|
|
46 |
|
|
47 |
"Created: 16.4.1996 / 12:11:45 / cg"
|
|
48 |
! !
|
|
49 |
|
91
|
50 |
!JavaExceptionTableEntry class methodsFor:'documentation'!
|
6
|
51 |
|
|
52 |
version
|
100
|
53 |
^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaExceptionTableEntry.st,v 1.4 1996/07/01 13:41:48 cg Exp $'
|
6
|
54 |
! !
|