org.jboss.byteman.agent.adapter.cfg
Class InstructionSequence

java.lang.Object
  extended by org.jboss.byteman.agent.adapter.cfg.InstructionSequence

public class InstructionSequence
extends java.lang.Object

Class used to hold a sequence of instructions within a basic block


Constructor Summary
InstructionSequence()
           
 
Method Summary
 int add(int insn)
          add an instruction to the sequence
 int add(int insn, int arg1)
          add an instruction with one encoded argument to the sequence
 int add(int insn, int[] args)
          add an instruction with an arbitrary number of encoded arguments to the sequence
 int add(int insn, int arg1, int arg2)
          add an instruction with two encoded arguments to the sequence
 int add(int insn, int arg1, int arg2, int arg3)
          add an instruction with three encoded arguments to the sequence
 int get(int i)
          return the instruction at the supplied offset
 int getArg(int i, int j)
          return a specific encoded argument of a given instruction
 int getArgCount(int i)
          return the number of encoded arguments of a given instruction
 int getType(int i)
          return the type of a given instruction
 int size()
          return the number of instructions in the sequence
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InstructionSequence

public InstructionSequence()
Method Detail

size

public int size()
return the number of instructions in the sequence

Returns:
the the number of instructions in the sequence

get

public int get(int i)
return the instruction at the supplied offset

Returns:
the ith instruction in the sequuence

getType

public int getType(int i)
return the type of a given instruction

Returns:
the ith instruction in the sequuence

getArgCount

public int getArgCount(int i)
return the number of encoded arguments of a given instruction

Parameters:
i - the offset of the instruction
Returns:
the number of encoded arguments of the ith instruction in the sequuence

getArg

public int getArg(int i,
                  int j)
return a specific encoded argument of a given instruction

Parameters:
i - the offset of the instruction
j - the index of the arguument attached to the instruction
Returns:
the jth encoded argument of the ith instruction in the sequuence

add

public int add(int insn)
add an instruction to the sequence

Parameters:
insn -
Returns:
the index of the newly added instruction

add

public int add(int insn,
               int arg1)
add an instruction with one encoded argument to the sequence

Parameters:
insn -
Returns:
the index of the newly added instruction

add

public int add(int insn,
               int arg1,
               int arg2)
add an instruction with two encoded arguments to the sequence

Parameters:
insn -
Returns:
the index of the newly added instruction

add

public int add(int insn,
               int arg1,
               int arg2,
               int arg3)
add an instruction with three encoded arguments to the sequence

Parameters:
insn -
Returns:
the index of the newly added instruction

add

public int add(int insn,
               int[] args)
add an instruction with an arbitrary number of encoded arguments to the sequence

Parameters:
insn -
Returns:
the index of the newly added instruction


Copyright © 2012. All Rights Reserved.