Class LocalVariable


  • public class LocalVariable
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int index  
      private int length  
      private java.lang.String name  
      private java.lang.String signature  
      private int start_pc  
    • Constructor Summary

      Constructors 
      Constructor Description
      LocalVariable​(java.io.DataInputStream input, ConstantPool constantPool)
      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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getIndex()
      Get the index in the local variable table (memory location/slot).
      int getLengthPosition()
      Get the code position length within the local variable has a value.
      java.lang.String getName()
      Get the name of the variable
      java.lang.String getSignature()
      Get the type/signature of the variable
      int getStartPosition()
      Get the code position within the local variable has a value.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • start_pc

        private final int start_pc
      • length

        private final int length
      • name

        private final java.lang.String name
      • signature

        private final java.lang.String signature
      • index

        private final int index
    • Constructor Detail

      • LocalVariable

        LocalVariable​(java.io.DataInputStream input,
                      ConstantPool constantPool)
               throws java.io.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
        position - the position in the LocalVariableTable
        constantPool - Reference to the current ConstantPool
        Throws:
        java.io.IOException - if any I/O error occurs.
    • Method Detail

      • getIndex

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

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

        public java.lang.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