|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rice.cs.cunit.classFile.code.instructions.LineNumberTable
public class LineNumberTable
A table that relates PC values to line numbers.
| Field Summary | |
|---|---|
(package private) java.util.Hashtable<java.lang.Integer,java.lang.Integer> |
_lineNumberToPC
Hash table to convert from line numbers to PCs. |
(package private) int |
_maxLineNo
Line number value just after the last instruction. |
(package private) int |
_maxPC
PC value just after the last instruction. |
(package private) java.util.Hashtable<java.lang.Integer,java.lang.Integer> |
_pcToLineNumber
Hash table to convert from PC to line numbers. |
| Constructor Summary | |
|---|---|
LineNumberTable(byte[] bytecode)
Create the line number table from bytecode. |
|
LineNumberTable(InstructionList ilist)
Create a line number table from a list of instructions. |
|
LineNumberTable(java.util.LinkedList<AInstruction> instrList)
Create a line number table from a list of instructions. |
|
| Method Summary | |
|---|---|
int |
getLineNumber(int pc)
Get the line number from the PC. |
int |
getPC(int lineNo)
Get the PC from the line number. |
protected void |
put(int pc,
int lineNo)
Put this PC-line number pair into the hash tables. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
java.util.Hashtable<java.lang.Integer,java.lang.Integer> _pcToLineNumber
java.util.Hashtable<java.lang.Integer,java.lang.Integer> _lineNumberToPC
int _maxPC
int _maxLineNo
| Constructor Detail |
|---|
public LineNumberTable(byte[] bytecode)
bytecode - bytecodepublic LineNumberTable(java.util.LinkedList<AInstruction> instrList)
instrList - list of instructionspublic LineNumberTable(InstructionList ilist)
ilist - list of instructions| Method Detail |
|---|
protected void put(int pc,
int lineNo)
pc - PC valuelineNo - line number
public int getLineNumber(int pc)
throws java.util.NoSuchElementException
pc - program counter
java.util.NoSuchElementException
public int getPC(int lineNo)
throws java.util.NoSuchElementException
lineNo - line number
java.util.NoSuchElementException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||