Class CodeExceptionGen

java.lang.Object
org.apache.bcel.generic.CodeExceptionGen
All Implemented Interfaces:
Cloneable, InstructionTargeter

public final class CodeExceptionGen extends Object implements InstructionTargeter, Cloneable
This class represents an exception handler, that is, specifies the region where a handler is active and an instruction where the actual handling is done. pool as parameters. Opposed to the JVM specification the end of the handled region is set to be inclusive, for example all instructions between start and end are protected including the start and end instructions (handles) themselves. The end of the region is automatically mapped to be exclusive when calling getCodeException(), that is, there is no difference semantically.
See Also:
  • Constructor Details

    • CodeExceptionGen

      public CodeExceptionGen(InstructionHandle startPc, InstructionHandle endPc, InstructionHandle handlerPc, ObjectType catchType)
      Add an exception handler, that is, specify region where a handler is active and an instruction where the actual handling is done.
      Parameters:
      startPc - Start of handled region (inclusive).
      endPc - End of handled region (inclusive).
      handlerPc - Where handling is done.
      catchType - which exception is handled, null for ANY.
  • Method Details