joeq.Compiler.BytecodeAnalysis
Class Bytecodes.BranchHandle

java.lang.Object
  extended by joeq.Compiler.BytecodeAnalysis.Bytecodes.InstructionHandle
      extended by joeq.Compiler.BytecodeAnalysis.Bytecodes.BranchHandle
All Implemented Interfaces:
Serializable
Enclosing interface:
Bytecodes

public static final class Bytecodes.BranchHandle
extends Bytecodes.InstructionHandle

See Also:
Serialized Form

Field Summary
 
Fields inherited from class joeq.Compiler.BytecodeAnalysis.Bytecodes.InstructionHandle
i_position
 
Method Summary
protected  void addHandle()
          Handle adds itself to the list of resuable handles.
 int getPosition()
           
 Bytecodes.InstructionHandle getTarget()
           
 void setInstruction(Bytecodes.Instruction i)
          Set new contents.
 void setTarget(Bytecodes.InstructionHandle ih)
          Pass new target to instruction.
protected  int updatePosition(int offset, int max_offset)
          Called by InstructionList.setPositions when setting the position for every instruction.
 void updateTarget(Bytecodes.InstructionHandle old_ih, Bytecodes.InstructionHandle new_ih)
          Update target of instruction.
 
Methods inherited from class joeq.Compiler.BytecodeAnalysis.Bytecodes.InstructionHandle
accept, addAttribute, addTargeter, getAttribute, getInstruction, getNext, getPrev, getTargeters, hasTargeters, removeAllTargeters, removeAttribute, removeTargeter, swapInstruction, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

addHandle

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

Overrides:
addHandle in class Bytecodes.InstructionHandle

getPosition

public int getPosition()
Overrides:
getPosition in class Bytecodes.InstructionHandle
Returns:
the position, i.e., the byte code offset of the contained instruction. This is accurate only after InstructionList.setPositions() has been called.

updatePosition

protected int updatePosition(int offset,
                             int max_offset)
Description copied from class: Bytecodes.InstructionHandle
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.

Overrides:
updatePosition in class Bytecodes.InstructionHandle
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

setTarget

public void setTarget(Bytecodes.InstructionHandle ih)
Pass new target to instruction.


updateTarget

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


getTarget

public Bytecodes.InstructionHandle getTarget()
Returns:
target of instruction.

setInstruction

public void setInstruction(Bytecodes.Instruction i)
Set new contents. Old instruction is disposed and may not be used anymore.

Overrides:
setInstruction in class Bytecodes.InstructionHandle


Copyright © 2001-2008 John Whaley. All Rights Reserved.