- All Superinterfaces:
ClassFileElement,CodeElement,Instruction
- All Known Implementing Classes:
AbstractInstruction.UnboundConvertInstruction
public sealed interface ConvertInstruction
extends Instruction
permits AbstractInstruction.UnboundConvertInstruction
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. Delivered as a CodeElement when traversing the elements of a CodeModel.- Since:
- 22
-
Method Summary
Modifier and TypeMethodDescriptionfromType()Returns the source type to convert from.static ConvertInstructionReturns a conversion instruction.static ConvertInstructionReturns A conversion instruction.toType()Returns the destination type to convert to.Methods inherited from interface org.glavo.classfile.Instruction
opcode, sizeInBytes
-
Method Details
-
fromType
TypeKind fromType()Returns the source type to convert from.- Returns:
- the source type to convert from
-
toType
TypeKind toType()Returns the destination type to convert to.- Returns:
- the destination type to convert to
-
of
Returns A conversion instruction.- Parameters:
fromType- the type to convert fromtoType- the type to convert to- Returns:
- A conversion instruction
-
of
Returns a conversion instruction.- Parameters:
op- the opcode for the specific type of conversion instruction, which must be of kindOpcode.Kind.CONVERT- Returns:
- a conversion instruction
-