APIdia Launch Partner
Top Description Methods
java.lang.classfile.instruction

public sealed Interface OperatorInstruction

extends Instruction
permits UnboundOperatorInstruction
Known Direct Implementers
jdk.internal.classfile.impl.AbstractInstruction.UnboundOperatorInstruction
Imports
java.lang.classfile.CodeElement, .CodeModel, .Instruction, .Opcode, .TypeKind, jdk.internal.classfile.impl.AbstractInstruction, .Util

Models an arithmetic operator instruction in the code array of a Code attribute. Corresponding opcodes have a kind of Opcode.Kind#OPERATOR. Delivered as a CodeElement when traversing the elements of a CodeModel.

An operator instruction is composite:

OperatorInstruction(Opcode opcode)
OperatorInstruction(Opcode opcode)
Since
24
See Also
Opcode.Kind#OPERATOR

Method Summary

Modifier and TypeMethod and Description
public static OperatorInstruction

Returns:

an operator instruction
of
(Opcode
the opcode for the specific type of operator instruction, which must be of kind Opcode.Kind#OPERATOR
op
)

Returns an operator instruction.

public TypeKind

Returns:

the operand type of the instruction
typeKind
()

Returns the operand type of the instruction.

Inherited from java.lang.classfile.Instruction:
opcodesizeInBytes

Method Detail

ofback to summary
public static OperatorInstruction of(Opcode op)

Returns an operator instruction.

Parameters
op:Opcode

the opcode for the specific type of operator instruction, which must be of kind Opcode.Kind#OPERATOR

Returns:OperatorInstruction

an operator instruction

Exceptions
IllegalArgumentException:
if the opcode kind is not Opcode.Kind#OPERATOR.
typeKindback to summary
public TypeKind typeKind()

Returns the operand type of the instruction. This is derived from the opcode.

Returns:TypeKind

the operand type of the instruction