com.ibm.wala.shrikeCT
Class CodeReader

java.lang.Object
  extended by com.ibm.wala.shrikeCT.AttributeReader
      extended by com.ibm.wala.shrikeCT.CodeReader

public final class CodeReader
extends AttributeReader

This attribute reader reads Code attributes from methods.


Field Summary
 
Fields inherited from class com.ibm.wala.shrikeCT.AttributeReader
attr, cr, length
 
Constructor Summary
CodeReader(ClassReader.AttrIterator iter)
           
 
Method Summary
 byte[] getBytecode()
           
 int getBytecodeLength()
           
 int getMaxLocals()
           
 int getMaxStack()
           
 int[] getRawHandlers()
           
 void initAttributeIterator(ClassReader.AttrIterator iter)
          Point iter at the list of attributes for this code.
 
Methods inherited from class com.ibm.wala.shrikeCT.AttributeReader
checkSize, checkSizeEquals, getClassReader, getRawOffset, getRawSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CodeReader

public CodeReader(ClassReader.AttrIterator iter)
           throws InvalidClassFileException
Throws:
InvalidClassFileException
Method Detail

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

public void initAttributeIterator(ClassReader.AttrIterator iter)
Point iter at the list of attributes for this code.

Throws:
java.lang.IllegalArgumentException - if iter is null