Интерфейс Instruction
- Все суперинтерфейсы:
ClassFileElement, CodeElement
- Все известные подинтерфейсы:
ArrayLoadInstruction, ArrayStoreInstruction, BranchInstruction, ConstantInstruction, ConstantInstruction.ArgumentConstantInstruction, ConstantInstruction.IntrinsicConstantInstruction, ConstantInstruction.LoadConstantInstruction, ConvertInstruction, DiscontinuedInstruction, DiscontinuedInstruction.JsrInstruction, DiscontinuedInstruction.RetInstruction, FieldInstruction, IncrementInstruction, InvokeDynamicInstruction, InvokeInstruction, LoadInstruction, LookupSwitchInstruction, MonitorInstruction, NewMultiArrayInstruction, NewObjectInstruction, NewPrimitiveArrayInstruction, NewReferenceArrayInstruction, NopInstruction, OperatorInstruction, ReturnInstruction, StackInstruction, StoreInstruction, TableSwitchInstruction, ThrowInstruction, TypeCheckInstruction
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 (not exhaustive)
Моделирует исполняемую инструкцию в массиве
code атрибута Code метода. Порядок инструкций в CodeModel имеет значение. opcode определяет операцию инструкции. Для инструкций у каждого вида опкода есть собственный интерфейс моделирования.
- См. Спецификацию виртуальной машины Java:
- 6.5 Инструкции
- Граф иерархии запечатанных классов:
- Начиная с версии:
- 24
- См. также:
Краткое описание методов
| Модификатор и тип | Метод | Описание |
|---|---|---|
Opcode |
opcode() |
Возвращает операцию этой инструкции. |
int |
sizeInBytes() |
Возвращает размер этой инструкции в байтах. |
Подробное описание методов
opcode
Opcode opcode()
Возвращает операцию этой инструкции.
- Возвращает:
- операцию этой инструкции
sizeInBytes
int sizeInBytes()
Возвращает размер этой инструкции в байтах. Это значение равно
opcode().sizeIfFixed(), если оно не -1.- Возвращает:
- размер этой инструкции в байтах
© 1993, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/classfile/Instruction.html