Main Page   Packages   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

TargetLostException Class Reference

Inheritance diagram for TargetLostException:
[legend]
Collaboration diagram for TargetLostException:
[legend]
List of all members.

Public Methods

InstructionHandle[] getTargets ()
InstructionHandle[] getTargets ()

Private Methods

 TargetLostException (InstructionHandle[] t, String mesg)
 TargetLostException (InstructionHandle[] t, String mesg)

Private Attributes

InstructionHandle[] targets
InstructionHandle[] targets

Detailed Description

Thrown by InstructionList.remove() when one or multiple disposed instruction are still being referenced by a InstructionTargeter object. I.e. the InstructionTargeter has to be notified that (one of) the InstructionHandle it is referencing is being removed from the InstructionList and thus not valid anymore.

Making this an exception instead of a return value forces the user to handle these case explicitely in a try { ... } catch. The following code illustrates how this may be done:

     ... 
     try { 
	il.delete(start_ih, end_ih); 
     } catch(TargetLostException e) { 
       InstructionHandle[] targets = e.getTargets(); 
	 for(int i=0; i < targets.length; i++) { 
	   InstructionTargeter[] targeters = targets[i].getTargeters(); 
	   for(int j=0; j < targeters.length; j++) 
	     targeters[j].updateTarget(targets[i], new_target); 
       } 
     } 
 

See also:
InstructionHandle , InstructionList , InstructionTargeter
Version:
Id:
TargetLostException.java,v 1.1.1.1 2002/01/24 03:44:04 pserver Exp
Author:
M. Dahm

Definition at line 34 of file lib/jpf/de/fub/bytecode/generic/TargetLostException.java.


Member Function Documentation

InstructionHandle [] TargetLostException::getTargets   [inline]
 

Returns:
list of instructions still being targeted.

Definition at line 44 of file src/de/fub/bytecode/generic/TargetLostException.java.

InstructionHandle [] TargetLostException::getTargets   [inline]
 

Returns:
list of instructions still being targeted.

Definition at line 44 of file lib/jpf/de/fub/bytecode/generic/TargetLostException.java.


The documentation for this class was generated from the following files:
Generated at Thu Feb 7 07:22:21 2002 for Bandera by doxygen1.2.10 written by Dimitri van Heesch, © 1997-2001