Class LocalVariableTableReader
java.lang.Object
com.ibm.wala.shrike.shrikeCT.AttributeReader
com.ibm.wala.shrike.shrikeCT.LocalVariableTableReader
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.shrike.shrikeCT.AttributeReader
attr, cr, length
-
Constructor Summary
-
Method Summary
Methods inherited from class com.ibm.wala.shrike.shrikeCT.AttributeReader
checkSize, checkSizeEquals, getClassReader, getRawOffset, getRawSize
-
Constructor Details
-
LocalVariableTableReader
- Throws:
InvalidClassFileException
-
-
Method Details
-
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
-