Package org.aspectj.apache.bcel.generic
Klasse CodeExceptionGen
java.lang.Object
org.aspectj.apache.bcel.generic.CodeExceptionGen
- Alle implementierten Schnittstellen:
Serializable
,Cloneable
,InstructionTargeter
public final class CodeExceptionGen
extends Object
implements InstructionTargeter, Cloneable, Serializable
This class represents an exception handler, i.e., 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, i.e. 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(), i.e., there is no difference semantically.
- Version:
- $Id: CodeExceptionGen.java,v 1.5 2008/05/28 23:52:56 aclement Exp $
- Autor:
- M. Dahm
- Siehe auch:
-
Konstruktorübersicht
KonstruktorBeschreibungCodeExceptionGen
(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. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungclone()
boolean
Gets the type of the Exception to catch, 'null' for ANY.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.getEndPC()
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) toString()
void
updateTarget
(InstructionHandle old_ih, InstructionHandle new_ih)
-
Konstruktordetails
-
CodeExceptionGen
public 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.- Parameter:
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 ANY
-
-
Methodendetails
-
getCodeException
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.- Parameter:
cp
- constant pool
-
setStartPC
-
setEndPC
-
setHandlerPC
-
updateTarget
- Angegeben von:
updateTarget
in SchnittstelleInstructionTargeter
- Parameter:
old_ih
- old target, either start or endnew_ih
- new target
-
containsTarget
- Angegeben von:
containsTarget
in SchnittstelleInstructionTargeter
- Gibt zurück:
- true, if ih is target of this handler
-
setCatchType
Sets the type of the Exception to catch. Set 'null' for ANY. -
getCatchType
Gets the type of the Exception to catch, 'null' for ANY. -
getStartPC
- Gibt zurück:
- start of handled region (inclusive)
-
getEndPC
- Gibt zurück:
- end of handled region (inclusive)
-
getHandlerPC
- Gibt zurück:
- start of handler
-
toString
-
clone
-