454
|
1 |
"
|
|
2 |
COPYRIGHT (c) 1997 by eXept Software AG
|
|
3 |
All Rights Reserved
|
|
4 |
|
|
5 |
This software is furnished under a license and may be used
|
|
6 |
only in accordance with the terms of that license and with the
|
|
7 |
inclusion of the above copyright notice. This software may not
|
|
8 |
be provided or otherwise made available to, or used by, any
|
|
9 |
other person. No title to or ownership of the software is
|
|
10 |
hereby transferred.
|
|
11 |
"
|
|
12 |
|
|
13 |
|
|
14 |
|
6
|
15 |
Object subclass:#JavaExceptionTableEntry
|
|
16 |
instanceVariableNames:'startPC endPC handlerPC catchType'
|
|
17 |
classVariableNames:''
|
|
18 |
poolDictionaries:''
|
|
19 |
category:'Java-Support'
|
|
20 |
!
|
|
21 |
|
454
|
22 |
!JavaExceptionTableEntry class methodsFor:'documentation'!
|
|
23 |
|
|
24 |
copyright
|
|
25 |
"
|
|
26 |
COPYRIGHT (c) 1997 by eXept Software AG
|
|
27 |
All Rights Reserved
|
|
28 |
|
|
29 |
This software is furnished under a license and may be used
|
|
30 |
only in accordance with the terms of that license and with the
|
|
31 |
inclusion of the above copyright notice. This software may not
|
|
32 |
be provided or otherwise made available to, or used by, any
|
|
33 |
other person. No title to or ownership of the software is
|
|
34 |
hereby transferred.
|
|
35 |
"
|
|
36 |
|
|
37 |
|
|
38 |
! !
|
6
|
39 |
|
135
|
40 |
!JavaExceptionTableEntry class methodsFor:'instance creation'!
|
6
|
41 |
|
|
42 |
startPC:start_pc endPC:end_pc handlerPC:handler_pc catchType:catch_type
|
|
43 |
^ self new startPC:start_pc endPC:end_pc handlerPC:handler_pc catchType:catch_type
|
|
44 |
|
|
45 |
"Created: 16.4.1996 / 12:11:13 / cg"
|
|
46 |
! !
|
|
47 |
|
135
|
48 |
!JavaExceptionTableEntry methodsFor:'accessing'!
|
|
49 |
|
|
50 |
catchType
|
|
51 |
"return the value of the instance variable 'catchType' (automatically generated)"
|
|
52 |
|
|
53 |
^ catchType
|
|
54 |
|
|
55 |
"Created: 7.2.1997 / 21:01:23 / cg"
|
|
56 |
!
|
|
57 |
|
|
58 |
endPC
|
|
59 |
"return the value of the instance variable 'endPC' (automatically generated)"
|
|
60 |
|
|
61 |
^ endPC
|
|
62 |
|
|
63 |
"Created: 7.2.1997 / 20:53:23 / cg"
|
|
64 |
!
|
|
65 |
|
|
66 |
handlerPC
|
|
67 |
"return the value of the instance variable 'handlerPC' (automatically generated)"
|
|
68 |
|
|
69 |
^ handlerPC
|
|
70 |
|
|
71 |
"Created: 7.2.1997 / 20:06:31 / cg"
|
|
72 |
!
|
|
73 |
|
|
74 |
startPC
|
|
75 |
"return the value of the instance variable 'startPC' (automatically generated)"
|
|
76 |
|
|
77 |
^ startPC
|
|
78 |
|
|
79 |
"Created: 7.2.1997 / 20:53:20 / cg"
|
|
80 |
! !
|
|
81 |
|
164
|
82 |
!JavaExceptionTableEntry methodsFor:'printing & storing'!
|
|
83 |
|
|
84 |
displayString
|
226
|
85 |
^ super displayString , '(' , catchType displayString,
|
|
86 |
' in ' , startPC printString , '..' ,
|
164
|
87 |
endPC printString , '->' ,
|
|
88 |
handlerPC printString , ')'
|
|
89 |
|
226
|
90 |
"Modified: 15.8.1997 / 03:33:51 / cg"
|
164
|
91 |
! !
|
|
92 |
|
6
|
93 |
!JavaExceptionTableEntry methodsFor:'private accessing'!
|
|
94 |
|
47
|
95 |
handlerPCFor:exception at:pc in:aMethod
|
|
96 |
"if there is a handler for exceptionClass, with given pc,
|
|
97 |
return the handler-PC; otherwise, return nil."
|
|
98 |
|
107
|
99 |
|cls|
|
47
|
100 |
|
|
101 |
(pc between:startPC and:endPC) ifTrue:[
|
107
|
102 |
(catchType == 0) ifTrue:[^ handlerPC].
|
122
|
103 |
(catchType isNil) ifTrue:[^ handlerPC].
|
100
|
104 |
cls := aMethod javaClass.
|
114
|
105 |
catchType isUnresolved ifTrue:[
|
|
106 |
catchType := catchType preResolve.
|
|
107 |
].
|
107
|
108 |
(catchType isKindOf:JavaClass) ifFalse:[
|
47
|
109 |
self halt.
|
|
110 |
^ nil
|
|
111 |
].
|
111
|
112 |
(exception isKindOf:catchType) ifTrue:[
|
47
|
113 |
^ handlerPC
|
|
114 |
].
|
|
115 |
^ nil
|
|
116 |
].
|
|
117 |
^ nil
|
255
|
118 |
|
|
119 |
"Modified: / 7.1.1998 / 15:30:14 / cg"
|
47
|
120 |
!
|
|
121 |
|
6
|
122 |
startPC:start_pc endPC:end_pc handlerPC:handler_pc catchType:catch_type
|
|
123 |
startPC := start_pc.
|
|
124 |
endPC := end_pc.
|
|
125 |
handlerPC := handler_pc.
|
|
126 |
catchType := catch_type
|
|
127 |
|
|
128 |
"Created: 16.4.1996 / 12:11:45 / cg"
|
|
129 |
! !
|
|
130 |
|
135
|
131 |
!JavaExceptionTableEntry class methodsFor:'documentation'!
|
6
|
132 |
|
|
133 |
version
|
454
|
134 |
^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaExceptionTableEntry.st,v 1.14 1998/11/16 15:13:15 cg Exp $'
|
6
|
135 |
! !
|