Interface LoadInstruction

All Superinterfaces:
ClassfileElement, CodeElement, Instruction
All Known Implementing Classes:
AbstractInstruction.BoundLoadInstruction, AbstractInstruction.UnboundLoadInstruction

Models a local variable load instruction in the code array of a Code attribute. Corresponding opcodes will have a kind of Opcode.Kind.LOAD. Delivered as a CodeElement when traversing the elements of a CodeModel.
  • Method Details

    • slot

      int slot()
    • typeKind

      TypeKind typeKind()
    • of

      static LoadInstruction of(TypeKind kind, int slot)
      Returns a local variable load instruction.
      Parameters:
      kind - the type of the value to be loaded
      slot - the local varaible slot to load from
      Returns:
      a local variable load instruction
    • of

      static LoadInstruction of(Opcode op, int slot)
      Returns a local variable load instruction.
      Parameters:
      op - the opcode for the specific type of load instruction, which must be of kind Opcode.Kind.LOAD
      slot - the local varaible slot to load from
      Returns:
      a local variable load instruction