Class LocalVariableGen

java.lang.Object
org.apache.bcel.generic.LocalVariableGen
All Implemented Interfaces:
Cloneable, InstructionTargeter, NamedAndTyped

Represents a local variable within a method. It contains its scope, name and type. The generated LocalVariable object can be obtained with getLocalVariable which needs the instruction list and the constant pool as parameters.
See Also:
  • Constructor Details

    • LocalVariableGen

      public LocalVariableGen(int index, String name, Type type, InstructionHandle start, InstructionHandle end)
      Generate a local variable that with index 'index'. Note that double and long variables need two indexs. Index indices have to be provided by the user.
      Parameters:
      index - index of local variable
      name - its name
      type - its type
      start - from where the instruction is valid (null means from the start)
      end - until where the instruction is valid (null means to the end)
    • LocalVariableGen

      public LocalVariableGen(int index, String name, Type type, InstructionHandle start, InstructionHandle end, int origIndex)
      Generates a local variable that with index 'index'. Note that double and long variables need two indexs. Index indices have to be provided by the user.
      Parameters:
      index - index of local variable
      name - its name
      type - its type
      start - from where the instruction is valid (null means from the start)
      end - until where the instruction is valid (null means to the end)
      origIndex - index of local variable prior to any changes to index
  • Method Details