edu.rit.classfile
Class ExceptionHandler

java.lang.Object
  extended by edu.rit.classfile.ExceptionHandler

public abstract class ExceptionHandler
extends Object

Class ExceptionHandler encapsulates the information needed to describe an exception handler for a subroutine (method, constructor, or class initializer). This includes the start location, end location, handler location, and catch type.


Method Summary
 ClassReference getCatchType()
          Returns this exception handler's catch type.
 Location getEndLocation()
          Returns this exception handler's end location.
 Location getHandlerLocation()
          Returns this exception handler's handler location.
 Location getStartLocation()
          Returns this exception handler's start location.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getStartLocation

public Location getStartLocation()
Returns this exception handler's start location. This is the location of the first instruction in the subroutine's bytecode sequence covered by this exception handler. (The start location is inclusive.)


getEndLocation

public Location getEndLocation()
Returns this exception handler's end location. This is the location of the next instruction after the last instruction in the subroutine's bytecode sequence covered by this exception handler. (The end location is exclusive.)


getHandlerLocation

public Location getHandlerLocation()
Returns this exception handler's handler location. This is the location of the first instruction in the exception handler itself.


getCatchType

public ClassReference getCatchType()
Returns this exception handler's catch type. This is a class reference to the exception class caught by this exception handler. If this exception handler catches all exceptions, null is returned.



Copyright © 2001-2006 by Alan Kaminsky. All rights reserved. Send comments to ark­@­cs.rit.edu.