public final class CodeExceptionGen extends Object implements InstructionTargeter, Cloneable
MethodGen,
CodeException,
InstructionHandle| Constructor and Description |
|---|
CodeExceptionGen(InstructionHandle startPc,
InstructionHandle endPc,
InstructionHandle handlerPc,
ObjectType catchType)
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 |
|---|---|
Object |
clone() |
boolean |
containsTarget(InstructionHandle ih)
Checks whether this targeter targets the specified instruction handle.
|
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 catchType)
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)
Replaces the target of this targeter from this old handle to the new handle.
|
public CodeExceptionGen(InstructionHandle startPc, InstructionHandle endPc, InstructionHandle handlerPc, ObjectType catchType)
startPc - Start of handled region (inclusive)endPc - End of handled region (inclusive)handlerPc - Where handling is donecatchType - which exception is handled, null for ANYpublic CodeException getCodeException(ConstantPoolGen 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)
InstructionTargeterupdateTarget in interface InstructionTargeterold_ih - old target, either start or endnew_ih - new targetpublic boolean containsTarget(InstructionHandle ih)
InstructionTargetercontainsTarget in interface InstructionTargeterpublic void setCatchType(ObjectType catchType)
public ObjectType getCatchType()
public InstructionHandle getStartPC()
public InstructionHandle getEndPC()
public InstructionHandle getHandlerPC()
Copyright © 2004–2020 The Apache Software Foundation. All rights reserved.