public final class CodeExceptionGen extends java.lang.Object implements InstructionTargeter, java.lang.Cloneable, java.io.Serializable
MethodGen,
CodeException,
InstructionHandle,
Serialized Form| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone() |
boolean |
containsTarget(InstructionHandle ih) |
ObjectType |
getCatchType()
Gets the type of the Exception to catch, 'null' for ANY.
|
CodeException |
getCodeException(ConstantPool 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) |
java.lang.String |
toString() |
void |
updateTarget(InstructionHandle old_ih,
InstructionHandle new_ih) |
public CodeExceptionGen(InstructionHandle start_pc, InstructionHandle end_pc, InstructionHandle handler_pc, ObjectType catch_type)
start_pc - Start of handled region (inclusive)end_pc - End of handled region (inclusive)handler_pc - Where handling is donecatch_type - which exception is handled, null for ANYpublic CodeException getCodeException(ConstantPool cp)
cp - constant poolpublic void setStartPC(InstructionHandle start_pc)
public void setEndPC(InstructionHandle end_pc)
public void setHandlerPC(InstructionHandle handler_pc)
public void updateTarget(InstructionHandle old_ih, InstructionHandle new_ih)
updateTarget in interface InstructionTargeterold_ih - old target, either start or endnew_ih - new targetpublic boolean containsTarget(InstructionHandle ih)
containsTarget in interface InstructionTargeterpublic void setCatchType(ObjectType catch_type)
public ObjectType getCatchType()
public InstructionHandle getStartPC()
public InstructionHandle getEndPC()
public InstructionHandle getHandlerPC()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.Object clone()
clone in class java.lang.Object