All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class de.fub.bytecode.generic.BranchHandle

java.lang.Object
   |
   +----de.fub.bytecode.generic.InstructionHandle
           |
           +----de.fub.bytecode.generic.BranchHandle

public final class BranchHandle
extends InstructionHandle
BranchHandle is returned by specialized InstructionList.append() whenever a BranchInstruction is appended. This is useful when the target of this instruction is not known at time of creation and must be set later via setTarget().

Version:
$Id: BranchHandle.java,v 1.11 2000/02/23 09:51:54 dahm Exp $
Author:
M. Dahm
See Also:
InstructionHandle, Instruction, InstructionList

Method Index

 o addHandle()
Handle adds itself to the list of resuable handles.
 o getPosition()
 o getTarget()
 o setInstruction(Instruction)
Set new contents.
 o setTarget(InstructionHandle)
Pass new target to instruction.
 o updatePosition(int, int)
Called by InstructionList.setPositions when setting the position for every instruction.
 o updateTarget(InstructionHandle, InstructionHandle)
Update target of instruction.

Methods

 o addHandle
 protected void addHandle()
Handle adds itself to the list of resuable handles.

Overrides:
addHandle in class InstructionHandle
 o getPosition
 public int getPosition()
Overrides:
getPosition in class InstructionHandle
 o updatePosition
 protected int updatePosition(int offset,
                              int max_offset)
Called by InstructionList.setPositions when setting the position for every instruction.

Overrides:
updatePosition in class InstructionHandle
 o setTarget
 public void setTarget(InstructionHandle ih)
Pass new target to instruction.

 o updateTarget
 public void updateTarget(InstructionHandle old_ih,
                          InstructionHandle new_ih)
Update target of instruction.

 o getTarget
 public InstructionHandle getTarget()
Returns:
target of instruction.
 o setInstruction
 public void setInstruction(Instruction i)
Set new contents. Old instruction is disposed and may not be used anymore.

Overrides:
setInstruction in class InstructionHandle

All Packages  Class Hierarchy  This Package  Previous  Next  Index