joeq.Class
Class jq_BytecodeMap
java.lang.Object
joeq.Class.jq_BytecodeMap
public class jq_BytecodeMap
- extends Object
This class implements a mapping from code offsets to bytecode indices.
- Version:
- $Id: jq_BytecodeMap.java 1931 2004-09-22 22:17:47Z joewhaley $
- Author:
- John Whaley
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 |
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.
- Parameters:
offset
- code offset arraybytecode_index
- bytecode index array
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.
- Parameters:
off
- code offset to match
- Returns:
- bytecode index for the code offset, or -1
Copyright © 2001-2008 John Whaley. All Rights Reserved.