org.apache.bcel.generic
public final class CodeExceptionGen extends Object implements InstructionTargeter, Cloneable, Serializable
See Also: MethodGen CodeException InstructionHandle
Constructor Summary | |
---|---|
CodeExceptionGen(InstructionHandle start_pc, InstructionHandle end_pc, InstructionHandle handler_pc, ObjectType catch_type)
Add an exception handler, i.e., specify region where a handler is active and an
instruction where the actual handling is done.
|
Method Summary | |
---|---|
Object | clone() |
boolean | containsTarget(InstructionHandle ih) |
ObjectType | getCatchType() Gets the type of the Exception to catch, 'null' for ANY. |
CodeException | getCodeException(ConstantPoolGen cp)
Get CodeException object. This relies on that the instruction list has already been dumped to byte code or or that the `setPositions' methods has been called for the instruction list. |
InstructionHandle | getEndPC() |
InstructionHandle | getHandlerPC() |
InstructionHandle | getStartPC() |
void | setCatchType(ObjectType catch_type) Sets the type of the Exception to catch. |
void | setEndPC(InstructionHandle end_pc) |
void | setHandlerPC(InstructionHandle handler_pc) |
void | setStartPC(InstructionHandle start_pc) |
String | toString() |
void | updateTarget(InstructionHandle old_ih, InstructionHandle new_ih) |
Parameters: start_pc Start of handled region (inclusive) end_pc End of handled region (inclusive) handler_pc Where handling is done catch_type which exception is handled, null for ANY
Returns: true, if ih is target of this handler
Parameters: cp constant pool
Returns: end of handled region (inclusive)
Returns: start of handler
Returns: start of handled region (inclusive)
Parameters: old_ih old target, either start or end new_ih new target