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

Quick Search    Search Deep

Clazz
Class jq_BytecodeMap  view jq_BytecodeMap download jq_BytecodeMap.java

java.lang.Object
  extended byClazz.jq_BytecodeMap

public class jq_BytecodeMap
extends java.lang.Object

This class implements a mapping from code offsets to bytecode indices.

Version:
$Id: jq_BytecodeMap.java,v 1.6 2003/05/12 10:05:00 joewhaley Exp $

Field Summary
private  int[] bytecode_index
          Stores the bytecode indices.
private  int[] offset
          Stores the code offsets.
 
Constructor Summary
jq_BytecodeMap(int[] offset, int[] bytecode_index)
          Constructs a new bytecode map, using the given code offset and bytecode index array.
 
Method Summary
 int getBytecodeIndex(int off)
          Returns the bytecode index corresponding to the given code offset, or -1 if the offset is out of range.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

offset

private final int[] offset
Stores the code offsets.


bytecode_index

private final int[] bytecode_index
Stores the bytecode indices.

Constructor Detail

jq_BytecodeMap

public jq_BytecodeMap(int[] offset,
                      int[] bytecode_index)
Constructs a new bytecode map, using the given code offset and bytecode index array. The two arrays are co-indexed. Each entry in the code offset array corresponds to an inclusive start offset of the instructions corresponding to the bytecode index in the co-indexed bytecode array. The length of the two arrays must be equal.

Method Detail

getBytecodeIndex

public int getBytecodeIndex(int off)
Returns the bytecode index corresponding to the given code offset, or -1 if the offset is out of range.