- All Superinterfaces:
ClassFileElement,CodeElement,Instruction
- All Known Implementing Classes:
AbstractInstruction.BoundLoadInstruction,AbstractInstruction.UnboundLoadInstruction
public sealed interface LoadInstruction
extends Instruction
permits 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.- Since:
- 22
-
Method Summary
Modifier and TypeMethodDescriptionstatic LoadInstructionReturns a local variable load instruction.static LoadInstructionReturns a local variable load instruction.intslot()Returns the local variable slot to load from.typeKind()Returns the type of the value to be loaded.Methods inherited from interface org.glavo.classfile.Instruction
opcode, sizeInBytes
-
Method Details
-
slot
int slot()Returns the local variable slot to load from.- Returns:
- the local variable slot to load from
-
typeKind
TypeKind typeKind()Returns the type of the value to be loaded.- Returns:
- the type of the value to be loaded
-
of
Returns a local variable load instruction.- Parameters:
kind- the type of the value to be loadedslot- the local variable slot to load from- Returns:
- a local variable load instruction
-
of
Returns a local variable load instruction.- Parameters:
op- the opcode for the specific type of load instruction, which must be of kindOpcode.Kind.LOADslot- the local variable slot to load from- Returns:
- a local variable load instruction
-