'From Smalltalk/X, Version:3.3.1 on 7-jan-1998 at 4:02:29 pm' !
Object subclass:#JavaExceptionTableEntry
instanceVariableNames:'startPC endPC handlerPC catchType'
classVariableNames:''
poolDictionaries:''
category:'Java-Support'
!
!JavaExceptionTableEntry class methodsFor:'instance creation'!
startPC:start_pc endPC:end_pc handlerPC:handler_pc catchType:catch_type
^ self new startPC:start_pc endPC:end_pc handlerPC:handler_pc catchType:catch_type
"Created: 16.4.1996 / 12:11:13 / cg"
! !
!JavaExceptionTableEntry methodsFor:'accessing'!
catchType
"return the value of the instance variable 'catchType' (automatically generated)"
^ catchType
"Created: 7.2.1997 / 21:01:23 / cg"
!
endPC
"return the value of the instance variable 'endPC' (automatically generated)"
^ endPC
"Created: 7.2.1997 / 20:53:23 / cg"
!
handlerPC
"return the value of the instance variable 'handlerPC' (automatically generated)"
^ handlerPC
"Created: 7.2.1997 / 20:06:31 / cg"
!
startPC
"return the value of the instance variable 'startPC' (automatically generated)"
^ startPC
"Created: 7.2.1997 / 20:53:20 / cg"
! !
!JavaExceptionTableEntry methodsFor:'printing & storing'!
displayString
^ super displayString , '(' , catchType displayString,
' in ' , startPC printString , '..' ,
endPC printString , '->' ,
handlerPC printString , ')'
"Modified: 15.8.1997 / 03:33:51 / cg"
! !
!JavaExceptionTableEntry methodsFor:'private accessing'!
handlerPCFor:exception at:pc in:aMethod
"if there is a handler for exceptionClass, with given pc,
return the handler-PC; otherwise, return nil."
|cls|
(pc between:startPC and:endPC) ifTrue:[
(catchType == 0) ifTrue:[^ handlerPC].
(catchType isNil) ifTrue:[^ handlerPC].
cls := aMethod javaClass.
catchType isUnresolved ifTrue:[
catchType := catchType preResolve.
].
(catchType isKindOf:JavaClass) ifFalse:[
self halt.
^ nil
].
(exception isKindOf:catchType) ifTrue:[
^ handlerPC
].
^ nil
].
^ nil
"Modified: / 7.1.1998 / 15:30:14 / cg"
!
startPC:start_pc endPC:end_pc handlerPC:handler_pc catchType:catch_type
startPC := start_pc.
endPC := end_pc.
handlerPC := handler_pc.
catchType := catch_type
"Created: 16.4.1996 / 12:11:45 / cg"
! !
!JavaExceptionTableEntry class methodsFor:'documentation'!
version
^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaExceptionTableEntry.st,v 1.12 1998/01/12 14:24:32 cg Exp $'
! !