Class CodeReader
java.lang.Object
com.ibm.wala.shrike.shrikeCT.AttributeReader
com.ibm.wala.shrike.shrikeCT.CodeReader
This attribute reader reads Code attributes from methods.
-
Field Summary
Fields inherited from class AttributeReader
attr, cr, lengthModifier and TypeFieldDescriptionprotected final intprotected final ClassReaderprotected final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]intintintint[]voidPoint iter at the list of attributes for this code.Methods inherited from class AttributeReader
checkSize, checkSizeEquals, getClassReader, getRawOffset, getRawSizeModifier and TypeMethodDescriptionprotected final voidcheckSize(int offset, int len) Ensure that the len bytes starting at offset fall within the attribute data.protected final voidcheckSizeEquals(int offset, int len) Ensure that the len bytes starting at offset end at the end of the attribute data.final ClassReaderfinal intfinal int
-
Constructor Details
-
CodeReader
- Throws:
InvalidClassFileException
-
-
Method Details
-
getMaxStack
public int getMaxStack()- Returns:
- the maximum stack size used by the code, in words
-
getMaxLocals
public int getMaxLocals()- Returns:
- the maximum local variable size used by the code, in words
-
getBytecodeLength
public int getBytecodeLength()- Returns:
- the length of the bytecode array, in bytes
-
getBytecode
public byte[] getBytecode()- Returns:
- the bytecode bytes
-
getRawHandlers
public int[] getRawHandlers()- Returns:
- the raw exception handler data, a flattened sequence of (startPC, endPC, catchClassIndex, catchPC) tuples
-
initAttributeIterator
Point iter at the list of attributes for this code.- Throws:
IllegalArgumentException- if iter is null
-