Package com.ibm.wala.shrikeCT
Class LocalVariableTableReader
- java.lang.Object
-
- com.ibm.wala.shrikeCT.AttributeReader
-
- com.ibm.wala.shrikeCT.LocalVariableTableReader
-
public final class LocalVariableTableReader extends AttributeReader
This class reads LocalVariableTable attributes. Instead of constructing a LocalVariableTable directly, consider just calling LocalVariableTable.makeVarMap for convenient access to aggregate local variable data from all the LocalVariableTable attributes for a given Code.
-
-
Field Summary
-
Fields inherited from class com.ibm.wala.shrikeCT.AttributeReader
attr, cr, length
-
-
Constructor Summary
Constructors Constructor Description LocalVariableTableReader(ClassReader.AttrIterator iter)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int[]
getRawTable()
static int[][]
makeVarMap(CodeReader code)
-
Methods inherited from class com.ibm.wala.shrikeCT.AttributeReader
checkSize, checkSizeEquals, getClassReader, getRawOffset, getRawSize
-
-
-
-
Constructor Detail
-
LocalVariableTableReader
public LocalVariableTableReader(ClassReader.AttrIterator iter) throws InvalidClassFileException
- Throws:
InvalidClassFileException
-
-
Method Detail
-
getRawTable
public int[] getRawTable()
- Returns:
- the raw line number table data, a flattened sequence of (startPC, PClength, nameIndex, typeIndex, var) tuples
-
makeVarMap
public static int[][] makeVarMap(CodeReader code) throws InvalidClassFileException, IllegalArgumentException
- Returns:
- an array mapping bytecode offsets to arrays representing the local variable maps for each offset; a local variable map is represented as an array of localVars*2 elements, containing a pair (nameIndex, typeIndex) for each local variable; a pair (0,0) indicates there is no information for that local variable at that offset
- Throws:
InvalidClassFileException
IllegalArgumentException
-
-