Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Compil3r.BytecodeAnalysis
Class Bytecodes.BranchHandle  view Bytecodes.BranchHandle download Bytecodes.BranchHandle.java

java.lang.Object
  extended byCompil3r.BytecodeAnalysis.Bytecodes.InstructionHandle
      extended byCompil3r.BytecodeAnalysis.Bytecodes.BranchHandle
All Implemented Interfaces:
java.io.Serializable
Enclosing class:
Bytecodes

public static final class Bytecodes.BranchHandle
extends Bytecodes.InstructionHandle


Field Summary
private static Bytecodes.BranchHandle bh_list
          Factory methods.
private  Bytecodes.BranchInstruction bi
           
 
Fields inherited from class Compil3r.BytecodeAnalysis.Bytecodes.InstructionHandle
i_position, instruction, next, prev
 
Constructor Summary
private Bytecodes.BranchHandle(Bytecodes.BranchInstruction i)
           
 
Method Summary
protected  void addHandle()
          Handle adds itself to the list of resuable handles.
(package private) static Bytecodes.BranchHandle getBranchHandle(Bytecodes.BranchInstruction i)
           
 int getPosition()
           
 Bytecodes.InstructionHandle getTarget()
           
 void setInstruction(Bytecodes.Instruction i)
          Set new contents.
(package private)  void setPosition(int pos)
          Set the position, i.e., the byte code offset of the contained instruction.
 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 Compil3r.BytecodeAnalysis.Bytecodes.InstructionHandle
accept, addAttribute, addTargeter, dispose, getAttribute, getInstruction, getInstructionHandle, 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
 

Field Detail

bi

private Bytecodes.BranchInstruction bi

bh_list

private static Bytecodes.BranchHandle bh_list
Factory methods.

Constructor Detail

Bytecodes.BranchHandle

private Bytecodes.BranchHandle(Bytecodes.BranchInstruction i)
Method Detail

getBranchHandle

static final Bytecodes.BranchHandle getBranchHandle(Bytecodes.BranchInstruction i)

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

setPosition

void setPosition(int pos)
Description copied from class: Bytecodes.InstructionHandle
Set the position, i.e., the byte code offset of the contained instruction.

Overrides:
setPosition in class Bytecodes.InstructionHandle

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

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

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