org.cojen.classfile
Class ExceptionHandler

java.lang.Object
  extended by org.cojen.classfile.ExceptionHandler
All Implemented Interfaces:
LocationRange

public class ExceptionHandler
extends Object
implements LocationRange

This class corresponds to the exception_table structure as defined in section 4.7.4 of The Java Virtual Machine Specification.

Author:
Brian S O'Neill

Constructor Summary
ExceptionHandler(Location startLocation, Location endLocation, Location catchLocation, ConstantClassInfo catchType)
           
 
Method Summary
 Location getCatchLocation()
           
 ConstantClassInfo getCatchType()
          Returns null if every object is caught by this handler.
 Location getEndLocation()
          Returns end of this location range, exclusive.
 Location getStartLocation()
          Returns the start of this location range, inclusive.
static ExceptionHandler readFrom(ConstantPool cp, DataInput din)
           
 void writeTo(DataOutput dout)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExceptionHandler

public ExceptionHandler(Location startLocation,
                        Location endLocation,
                        Location catchLocation,
                        ConstantClassInfo catchType)
Parameters:
startLocation -
endLocation -
catchLocation -
catchType - if null, then catch every object.
Method Detail

getStartLocation

public Location getStartLocation()
Description copied from interface: LocationRange
Returns the start of this location range, inclusive.

Specified by:
getStartLocation in interface LocationRange

getEndLocation

public Location getEndLocation()
Description copied from interface: LocationRange
Returns end of this location range, exclusive.

Specified by:
getEndLocation in interface LocationRange

getCatchLocation

public Location getCatchLocation()

getCatchType

public ConstantClassInfo getCatchType()
Returns null if every object is caught by this handler.


writeTo

public void writeTo(DataOutput dout)
             throws IOException
Throws:
IOException

readFrom

public static ExceptionHandler readFrom(ConstantPool cp,
                                        DataInput din)
                                 throws IOException
Throws:
IOException


Copyright © 2004-2011 Brian S O'Neill. All Rights Reserved.