- All Superinterfaces:
ClassFileElement,CodeElement,Instruction
- All Known Implementing Classes:
AbstractInstruction.UnboundReturnInstruction
public sealed interface ReturnInstruction
extends Instruction
permits AbstractInstruction.UnboundReturnInstruction
Models a return-from-method instruction in the
code array of a
Code attribute. Corresponding opcodes will have a kind of
Opcode.Kind.RETURN. Delivered as a CodeElement when
traversing the elements of a CodeModel.- Since:
- 22
-
Method Summary
Modifier and TypeMethodDescriptionstatic ReturnInstructionReturns a return instruction.static ReturnInstructionReturns a return instruction.typeKind()Returns the type of the return instruction.Methods inherited from interface org.glavo.classfile.Instruction
opcode, sizeInBytes
-
Method Details
-
typeKind
TypeKind typeKind()Returns the type of the return instruction.- Returns:
- the type of the return instruction
-
of
Returns a return instruction.- Parameters:
typeKind- the type of the return instruction- Returns:
- a return instruction
-
of
Returns a return instruction.- Parameters:
op- the opcode for the specific type of return instruction, which must be of kindOpcode.Kind.RETURN- Returns:
- a return instruction
-