6
|
1 |
Object subclass:#JavaExceptionTableEntry
|
|
2 |
instanceVariableNames:'startPC endPC handlerPC catchType'
|
|
3 |
classVariableNames:''
|
|
4 |
poolDictionaries:''
|
|
5 |
category:'Java-Support'
|
|
6 |
!
|
|
7 |
|
|
8 |
|
135
|
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 |
|
135
|
17 |
!JavaExceptionTableEntry methodsFor:'accessing'!
|
|
18 |
|
|
19 |
catchType
|
|
20 |
"return the value of the instance variable 'catchType' (automatically generated)"
|
|
21 |
|
|
22 |
^ catchType
|
|
23 |
|
|
24 |
"Created: 7.2.1997 / 21:01:23 / cg"
|
|
25 |
!
|
|
26 |
|
|
27 |
endPC
|
|
28 |
"return the value of the instance variable 'endPC' (automatically generated)"
|
|
29 |
|
|
30 |
^ endPC
|
|
31 |
|
|
32 |
"Created: 7.2.1997 / 20:53:23 / cg"
|
|
33 |
!
|
|
34 |
|
|
35 |
handlerPC
|
|
36 |
"return the value of the instance variable 'handlerPC' (automatically generated)"
|
|
37 |
|
|
38 |
^ handlerPC
|
|
39 |
|
|
40 |
"Created: 7.2.1997 / 20:06:31 / cg"
|
|
41 |
!
|
|
42 |
|
|
43 |
startPC
|
|
44 |
"return the value of the instance variable 'startPC' (automatically generated)"
|
|
45 |
|
|
46 |
^ startPC
|
|
47 |
|
|
48 |
"Created: 7.2.1997 / 20:53:20 / cg"
|
|
49 |
! !
|
|
50 |
|
6
|
51 |
!JavaExceptionTableEntry methodsFor:'private accessing'!
|
|
52 |
|
47
|
53 |
handlerPCFor:exception at:pc in:aMethod
|
|
54 |
"if there is a handler for exceptionClass, with given pc,
|
|
55 |
return the handler-PC; otherwise, return nil."
|
|
56 |
|
107
|
57 |
|cls|
|
47
|
58 |
|
|
59 |
(pc between:startPC and:endPC) ifTrue:[
|
107
|
60 |
(catchType == 0) ifTrue:[^ handlerPC].
|
122
|
61 |
(catchType isNil) ifTrue:[^ handlerPC].
|
100
|
62 |
cls := aMethod javaClass.
|
114
|
63 |
catchType isUnresolved ifTrue:[
|
|
64 |
catchType := catchType preResolve.
|
|
65 |
].
|
107
|
66 |
(catchType isKindOf:JavaClass) ifFalse:[
|
47
|
67 |
self halt.
|
|
68 |
^ nil
|
|
69 |
].
|
111
|
70 |
(exception isKindOf:catchType) ifTrue:[
|
47
|
71 |
^ handlerPC
|
|
72 |
].
|
|
73 |
^ nil
|
|
74 |
].
|
|
75 |
^ nil
|
|
76 |
!
|
|
77 |
|
6
|
78 |
startPC:start_pc endPC:end_pc handlerPC:handler_pc catchType:catch_type
|
|
79 |
startPC := start_pc.
|
|
80 |
endPC := end_pc.
|
|
81 |
handlerPC := handler_pc.
|
|
82 |
catchType := catch_type
|
|
83 |
|
|
84 |
"Created: 16.4.1996 / 12:11:45 / cg"
|
|
85 |
! !
|
|
86 |
|
135
|
87 |
!JavaExceptionTableEntry class methodsFor:'documentation'!
|
6
|
88 |
|
|
89 |
version
|
135
|
90 |
^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaExceptionTableEntry.st,v 1.9 1997/02/07 20:37:24 cg Exp $'
|
6
|
91 |
! !
|