APIdia Launch Partner
Top Description Methods
java.lang.classfile

public sealed Interface Instruction

extends CodeElement
permits ArrayLoadInstruction, ArrayStoreInstruction, BranchInstruction, ConstantInstruction, ConvertInstruction, DiscontinuedInstruction, FieldInstruction, InvokeDynamicInstruction, InvokeInstruction, LoadInstruction, StoreInstruction, IncrementInstruction, LookupSwitchInstruction, MonitorInstruction, NewMultiArrayInstruction, NewObjectInstruction, NewPrimitiveArrayInstruction, NewReferenceArrayInstruction, NopInstruction, OperatorInstruction, ReturnInstruction, StackInstruction, TableSwitchInstruction, ThrowInstruction, TypeCheckInstruction, AbstractInstruction
Known Direct Subinterfaces
java.lang.classfile.instruction.ArrayLoadInstruction, java.lang.classfile.instruction.ArrayStoreInstruction, java.lang.classfile.instruction.BranchInstruction, java.lang.classfile.instruction.ConstantInstruction, java.lang.classfile.instruction.ConvertInstruction, java.lang.classfile.instruction.DiscontinuedInstruction, java.lang.classfile.instruction.FieldInstruction, java.lang.classfile.instruction.IncrementInstruction, java.lang.classfile.instruction.InvokeDynamicInstruction, java.lang.classfile.instruction.InvokeInstruction, java.lang.classfile.instruction.LoadInstruction, java.lang.classfile.instruction.LookupSwitchInstruction, java.lang.classfile.instruction.MonitorInstruction, java.lang.classfile.instruction.NewMultiArrayInstruction, java.lang.classfile.instruction.NewObjectInstruction, java.lang.classfile.instruction.NewPrimitiveArrayInstruction, java.lang.classfile.instruction.NewReferenceArrayInstruction, java.lang.classfile.instruction.NopInstruction, java.lang.classfile.instruction.OperatorInstruction, java.lang.classfile.instruction.ReturnInstruction, java.lang.classfile.instruction.StackInstruction, java.lang.classfile.instruction.StoreInstruction, java.lang.classfile.instruction.TableSwitchInstruction, java.lang.classfile.instruction.ThrowInstruction, java.lang.classfile.instruction.TypeCheckInstruction
Known Direct Implementers
jdk.internal.classfile.impl.AbstractInstruction
Imports
java.lang.classfile.attribute.CodeAttribute, java.lang.classfile.instruction.*, jdk.internal.classfile.impl.AbstractInstruction

Models an executable instruction in the code array of the Code attribute of a method. The order of instructions in a CodeModel is significant.

The opcode identifies the operation of an instruction. Each kind of opcode has its own modeling interface for instructions.

Since
24
Java Virtual Machine Specification
6.5 Instructions
See Also
Opcode

Method Summary

Modifier and TypeMethod and Description
public Opcode

Returns:

the operation of this instruction
opcode
()

Returns the operation of this instruction.

public int

Returns:

the size in bytes of this instruction
sizeInBytes
()

Returns the size in bytes of this instruction.

Method Detail

opcodeback to summary
public Opcode opcode()

Returns the operation of this instruction.

Returns:Opcode

the operation of this instruction

sizeInBytesback to summary
public int sizeInBytes()

Returns the size in bytes of this instruction. This value is equal to opcode().sizeIfFixed() if it is not -1.

Returns:int

the size in bytes of this instruction