- All Superinterfaces:
ClassFileElementPREVIEW
,CodeElementPREVIEW
,InstructionPREVIEW
ConvertInstruction
is a preview API of the Java platform.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
Models a primitive conversion instruction in the
code
array of a
Code
attribute, such as i2l
. Corresponding opcodes will have
a kind
of Opcode.Kind.CONVERT
PREVIEW. Delivered as a CodeElement
PREVIEW when traversing the elements of a CodeModel
PREVIEW.- Since:
- 22
-
Method Summary
Modifier and TypeMethodDescriptionfromType()
Returns the source type to convert from.static ConvertInstructionPREVIEW
Returns a conversion instruction.static ConvertInstructionPREVIEW
Returns A conversion instruction.toType()
Returns the destination type to convert to.Methods declared in interface java.lang.classfile.InstructionPREVIEW
opcode, sizeInBytes
-
Method Details
-
fromType
-
toType
-
of
-
of
Returns a conversion instruction.- Parameters:
op
- the opcode for the specific type of conversion instruction, which must be of kindOpcode.Kind.CONVERT
PREVIEW- Returns:
- a conversion instruction
-
ConvertInstruction
when preview features are enabled.