joeq.Compiler.BytecodeAnalysis
Class Bytecodes.BranchInstruction

java.lang.Object
  extended by joeq.Compiler.BytecodeAnalysis.Bytecodes.Instruction
      extended by joeq.Compiler.BytecodeAnalysis.Bytecodes.BranchInstruction
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, Bytecodes.InstructionTargeter
Direct Known Subclasses:
Bytecodes.GotoInstruction, Bytecodes.IfInstruction, Bytecodes.JsrInstruction, Bytecodes.Select
Enclosing interface:
Bytecodes

public abstract static class Bytecodes.BranchInstruction
extends Bytecodes.Instruction
implements Bytecodes.InstructionTargeter

See Also:
Serialized Form

Method Summary
 boolean containsTarget(Bytecodes.InstructionHandle ih)
           
 void dump(java.io.DataOutputStream out)
          Dump instruction as byte code to stream out.
 int getIndex()
           
 Bytecodes.InstructionHandle getTarget()
           
 void setTarget(Bytecodes.InstructionHandle target)
          Set branch target
 java.lang.String toString(boolean verbose)
          Long output format: <position in byte code> <name of opcode> "["<opcode number>"]" "("<length of instruction>")" "<"<target instruction>">" "@"<branch target offset>
 void updateTarget(Bytecodes.InstructionHandle old_ih, Bytecodes.InstructionHandle new_ih)
           
 
Methods inherited from class joeq.Compiler.BytecodeAnalysis.Bytecodes.Instruction
accept, consumeStack, copy, getLength, getOpcode, produceStack, readInstruction, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

dump

public void dump(java.io.DataOutputStream out)
          throws java.io.IOException
Dump instruction as byte code to stream out.

Overrides:
dump in class Bytecodes.Instruction
Parameters:
out - Output stream
Throws:
java.io.IOException

toString

public java.lang.String toString(boolean verbose)
Long output format: <position in byte code> <name of opcode> "["<opcode number>"]" "("<length of instruction>")" "<"<target instruction>">" "@"<branch target offset>

Overrides:
toString in class Bytecodes.Instruction
Parameters:
verbose - long/short format switch
Returns:
mnemonic for instruction

getIndex

public final int getIndex()
Returns:
target offset in byte code

getTarget

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

setTarget

public void setTarget(Bytecodes.InstructionHandle target)
Set branch target

Parameters:
target - branch target

updateTarget

public void updateTarget(Bytecodes.InstructionHandle old_ih,
                         Bytecodes.InstructionHandle new_ih)
Specified by:
updateTarget in interface Bytecodes.InstructionTargeter
Parameters:
old_ih - old target
new_ih - new target

containsTarget

public boolean containsTarget(Bytecodes.InstructionHandle ih)
Specified by:
containsTarget in interface Bytecodes.InstructionTargeter
Returns:
true, if ih is target of this instruction