Инструкция интерфейса
- Все суперинтерфейсы:
-
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 идентифицирует операцию инструкции. Каждый тип opcode имеет свой собственный интерфейс моделирования для инструкций.
- См. Спецификацию виртуальной машины Java:
- 6.5 Инструкции
- Диаграмма графа иерархии класса (sealed):
- С момента:
- 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://download.java.net/java/early_access/jdk24/docs/api/java.base/java/lang/classfile/Instruction.html