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

BranchHandle Class Reference

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

Public Methods

int getPosition ()
InstructionHandle getTarget ()
void setInstruction (Instruction i)
void setTarget (InstructionHandle ih)
void updateTarget (InstructionHandle old_ih, InstructionHandle new_ih)
int getPosition ()
InstructionHandle getTarget ()
void setInstruction (Instruction i)
void setTarget (InstructionHandle ih)
void updateTarget (InstructionHandle old_ih, InstructionHandle new_ih)

Protected Methods

void addHandle ()
int updatePosition (int offset, int max_offset)
void addHandle ()
int updatePosition (int offset, int max_offset)

Private Methods

 BranchHandle (BranchInstruction i)
void setPosition (int pos)
 BranchHandle (BranchInstruction i)
void setPosition (int pos)

Static Private Methods

final BranchHandle getBranchHandle (BranchInstruction i)
final BranchHandle getBranchHandle (BranchInstruction i)

Private Attributes

BranchInstruction bi

Static Private Attributes

BranchHandle bh_list = null

Detailed Description

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().

See also:
InstructionHandle , Instruction , InstructionList
Version:
Id:
BranchHandle.java,v 1.1.1.1 2002/01/24 03:44:02 pserver Exp
Author:
M. Dahm

Definition at line 15 of file lib/jpf/de/fub/bytecode/generic/BranchHandle.java.


Member Function Documentation

void BranchHandle::addHandle   [inline, protected]
 

Handle adds itself to the list of resuable handles.

Reimplemented from InstructionHandle.

Definition at line 28 of file src/de/fub/bytecode/generic/BranchHandle.java.

void BranchHandle::addHandle   [inline, protected]
 

Handle adds itself to the list of resuable handles.

Reimplemented from InstructionHandle.

Definition at line 28 of file lib/jpf/de/fub/bytecode/generic/BranchHandle.java.

InstructionHandle BranchHandle::getTarget   [inline]
 

Returns:
target of instruction.

Definition at line 52 of file src/de/fub/bytecode/generic/BranchHandle.java.

InstructionHandle BranchHandle::getTarget   [inline]
 

Returns:
target of instruction.

Definition at line 54 of file lib/jpf/de/fub/bytecode/generic/BranchHandle.java.

void BranchHandle::setInstruction Instruction   i [inline]
 

Set new contents. Old instruction is disposed and may not be used anymore.

Reimplemented from InstructionHandle.

Definition at line 58 of file src/de/fub/bytecode/generic/BranchHandle.java.

void BranchHandle::setInstruction Instruction   i [inline]
 

Set new contents. Old instruction is disposed and may not be used anymore.

Reimplemented from InstructionHandle.

Definition at line 60 of file lib/jpf/de/fub/bytecode/generic/BranchHandle.java.

void BranchHandle::setTarget InstructionHandle   ih [inline]
 

Pass new target to instruction.

Definition at line 73 of file src/de/fub/bytecode/generic/BranchHandle.java.

void BranchHandle::setTarget InstructionHandle   ih [inline]
 

Pass new target to instruction.

Definition at line 77 of file lib/jpf/de/fub/bytecode/generic/BranchHandle.java.

int BranchHandle::updatePosition int   offset,
int   max_offset
[inline, protected]
 

Called by InstructionList.setPositions when setting the position for every instruction. In the presence of variable length instructions `setPositions' performs multiple passes over the instruction list to calculate the correct (byte) positions and offsets by calling this function.

Parameters:
offset   additional offset caused by preceding (variable length) instructions
max_offset   the maximum offset that may be caused by these instructions
Returns:
additional offset caused by possible change of this instruction's length

Reimplemented from InstructionHandle.

Definition at line 76 of file src/de/fub/bytecode/generic/BranchHandle.java.

int BranchHandle::updatePosition int   offset,
int   max_offset
[inline, protected]
 

Called by InstructionList.setPositions when setting the position for every instruction. In the presence of variable length instructions `setPositions' performs multiple passes over the instruction list to calculate the correct (byte) positions and offsets by calling this function.

Parameters:
offset   additional offset caused by preceding (variable length) instructions
max_offset   the maximum offset that may be caused by these instructions
Returns:
additional offset caused by possible change of this instruction's length

Reimplemented from InstructionHandle.

Definition at line 80 of file lib/jpf/de/fub/bytecode/generic/BranchHandle.java.

void BranchHandle::updateTarget InstructionHandle   old_ih,
InstructionHandle   new_ih
[inline]
 

Update target of instruction.

Definition at line 84 of file src/de/fub/bytecode/generic/BranchHandle.java.

void BranchHandle::updateTarget InstructionHandle   old_ih,
InstructionHandle   new_ih
[inline]
 

Update target of instruction.

Definition at line 88 of file lib/jpf/de/fub/bytecode/generic/BranchHandle.java.


Member Data Documentation

BranchHandle BranchHandle::bh_list = null [static, private]
 

Factory methods.

Definition at line 20 of file src/de/fub/bytecode/generic/BranchHandle.java.


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