Class LocalVariableInfo


  • public class LocalVariableInfo
    extends Object
    A utility class holding the information about the name and the type of a local variable in a given slot (== index). This information often changes in course of byte code offsets.
    • Constructor Detail

      • LocalVariableInfo

        public LocalVariableInfo()
    • Method Detail

      • getType

        public Type getType​(int offset)
        Returns the type of the local variable that uses this local variable slot at the given bytecode offset. Care for legal bytecode offsets yourself, otherwise the return value might be wrong. May return 'null' if nothing is known about the type of this local variable slot at the given bytecode offset.
        Parameters:
        offset - bytecode offset.
        Returns:
        the type of the local variable that uses this local variable slot at the given bytecode offset.
      • getName

        public String getName​(int offset)
        Returns the name of the local variable that uses this local variable slot at the given bytecode offset. Care for legal bytecode offsets yourself, otherwise the return value might be wrong. May return 'null' if nothing is known about the type of this local variable slot at the given bytecode offset.
        Parameters:
        offset - bytecode offset.
        Returns:
        the name of the local variable that uses this local variable slot at the given bytecode offset.