Class Code

java.lang.Object
de.inetsoftware.classparser.Code

public class Code extends Object
Author:
Volker Berlin
  • Method Details

    • getConstantPool

      @Nonnull public ConstantPool getConstantPool()
      Get the constant pool of this code.
      Returns:
      the ConstantPool of the class
    • getExceptionTable

      @Nonnull public TryCatchFinally[] getExceptionTable()
      Get exception table of this code block.
      Returns:
      the table, can be empty
    • getLineNumberTable

      @Nullable public LineNumberTable getLineNumberTable() throws IOException
      Get the line number table. is null if the code was optimized.
      Returns:
      the table or null
      Throws:
      IOException - if any I/O error occur
    • getLocalVariableTable

      @Nullable public LocalVariableTable getLocalVariableTable() throws IOException
      Get the local variable table of this method.
      Returns:
      the variables
      Throws:
      IOException - if any I/O error occur
    • getFirstLineNr

      public int getFirstLineNr() throws IOException
      Throws:
      IOException
    • getByteCode

      public CodeInputStream getByteCode()
      Get the stream of Java Byte code instruction of this method.
      Returns:
      the stream
    • getCodeSize

      public int getCodeSize()
      Get the last position of the code.
      Returns:
      the size.