All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class de.fub.bytecode.generic.CodeExceptionGen

java.lang.Object
   |
   +----de.fub.bytecode.generic.CodeExceptionGen

public final class CodeExceptionGen
extends 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

Constructor Index

 o CodeExceptionGen(InstructionHandle, InstructionHandle, InstructionHandle, ObjectType)
Add an exception handler, i.e.

Method Index

 o containsTarget(InstructionHandle)
 o getCatchType()
 o getCodeException(ConstantPoolGen)
Get CodeException object.
 o getEndPC()
 o getHandlerPC()
 o getStartPC()
 o setCatchType(ObjectType)
 o setEndPC(InstructionHandle)
 o setHandlerPC(InstructionHandle)
 o setStartPC(InstructionHandle)
 o toString()
 o updateTarget(InstructionHandle, InstructionHandle)

Constructors

 o 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 region
end_pc - End of region
handler_pc - Where handling is done
catch_type - which exception is handled

Methods

 o 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
 o setStartPC
 public void setStartPC(InstructionHandle start_pc)
 o setEndPC
 public void setEndPC(InstructionHandle end_pc)
 o setHandlerPC
 public void setHandlerPC(InstructionHandle handler_pc)
 o updateTarget
 public void updateTarget(InstructionHandle old_ih,
                          InstructionHandle new_ih)
Parameters:
old_ih - old target, either start or end
new_ih - new target
 o containsTarget
 public boolean containsTarget(InstructionHandle ih)
Returns:
true, if ih is target of this handler
 o setCatchType
 public void setCatchType(ObjectType catch_type)
 o getCatchType
 public ObjectType getCatchType()
 o getStartPC
 public InstructionHandle getStartPC()
 o getHandlerPC
 public InstructionHandle getHandlerPC()
 o getEndPC
 public InstructionHandle getEndPC()
 o toString
 public String toString()
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index