Class LocalVariable

java.lang.Object
de.inetsoftware.classparser.LocalVariable

public class LocalVariable extends Object
  • Field Details

    • start_pc

      private final int start_pc
    • length

      private final int length
    • name

      private final String name
    • signature

      private final String signature
    • index

      private final int index
  • Constructor Details

    • LocalVariable

      LocalVariable(DataInputStream input, ConstantPool constantPool) throws IOException
      http://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.7.13 http://docs.oracle.com/javase/specs/jvms/se5.0/html/ClassFile.doc.html#5956
      Parameters:
      input - the stream of the class
      constantPool - Reference to the current ConstantPool
      position - the position in the LocalVariableTable
      Throws:
      IOException - if any I/O error occurs.
  • Method Details

    • getIndex

      public int getIndex()
      Get the index in the local variable table (memory location/slot).
      Returns:
      the index.
    • getName

      public String getName()
      Get the name of the variable
      Returns:
      the name
    • getSignature

      public String getSignature()
      Get the type/signature of the variable
      Returns:
      the signature
    • getStartPosition

      public int getStartPosition()
      Get the code position within the local variable has a value. The first set operation to the variable will start before this position.
      Returns:
      the position.
    • getLengthPosition

      public int getLengthPosition()
      Get the code position length within the local variable has a value.
      Returns:
      the length