edu.arizona.cs.mbel.instructions
Interface InstructionTargeter

All Known Implementing Classes:
BranchInstruction, StructuredExceptionClause, SWITCH

public interface InstructionTargeter

This interface is implemented by all classes that target instructions somehow. Examples are BranchInstruction, SWITCH, and the StructuredExcepti0onClause classes.


Method Summary
 boolean containsTarget(InstructionHandle ih)
          Returns true iff the given handle is targetted by this InstructionTargeter (comparison by reference)
 void updateTarget(InstructionHandle oldh, InstructionHandle newh)
          Updates one of this InstructionTargeter's targets.
 

Method Detail

containsTarget

public boolean containsTarget(InstructionHandle ih)
Returns true iff the given handle is targetted by this InstructionTargeter (comparison by reference)


updateTarget

public void updateTarget(InstructionHandle oldh,
                         InstructionHandle newh)
Updates one of this InstructionTargeter's targets. If this instance targets oldh (comparison by reference), then that target is replaced by newh. This method should also call oldh.removeTargeter(this) and newh.addTargeter(this) in every implementing class.