de.fub.bytecode.generic
Class CodeExceptionGen
java.lang.Object
|
+--de.fub.bytecode.generic.CodeExceptionGen
- public final class CodeExceptionGen
- extends java.lang.Object
- implements Constants, InstructionTargeter
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.
- Version:
- $Id: CodeExceptionGen.java,v 1.7 1999/08/30 13:54:31 dahm Exp $
- Author:
- M. Dahm
- See Also:
MethodGen
,
CodeException
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
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.
- Parameters:
start_pc
- Start of regionend_pc
- End of regionhandler_pc
- Where handling is donecatch_type
- which exception is handled
getCodeException
public 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.
- Parameters:
cp
- constant pool
setStartPC
public void setStartPC(InstructionHandle start_pc)
setEndPC
public void setEndPC(InstructionHandle end_pc)
setHandlerPC
public void setHandlerPC(InstructionHandle handler_pc)
updateTarget
public void updateTarget(InstructionHandle old_ih,
InstructionHandle new_ih)
- Specified by:
- updateTarget in interface InstructionTargeter
- Parameters:
old_ih
- old target, either start or endnew_ih
- new target
containsTarget
public boolean containsTarget(InstructionHandle ih)
- Specified by:
- containsTarget in interface InstructionTargeter
- Returns:
- true, if ih is target of this handler
setCatchType
public void setCatchType(ObjectType catch_type)
getCatchType
public ObjectType getCatchType()
getStartPC
public InstructionHandle getStartPC()
getHandlerPC
public InstructionHandle getHandlerPC()
getEndPC
public InstructionHandle getEndPC()
toString
public java.lang.String toString()
- Overrides:
- toString in class java.lang.Object