Next: Miscellaneous Instructions
Up: The Instruction Set
Previous: Branch and Comparison
The instructions presented here are used for method invocation or return.
- invokevirtual. Invoke instance method. Operands:
indexbyte1, indexbyte2. Stack:
..., objectref, [arg1, [arg2, ...]] ....
- invokespecial. Invoke instance method, special handling for
superclass, private and instance initialization method invocations. Operands:
indexbyte1, indexbyte2. Stack:
..., objectref, [arg1, [arg2, ...]] ....
- invokeinterface. Invoke interface method. Operands:
indexbyte1, indexbyte2, nargs, 0. Stack:
..., objectref, [arg1, [arg2, ...]] ....
- invokestatic. Invoke class method. Operands:
indexbyte1, indexbyte2. Stack:
..., [arg1, [arg2, ...]] ....
- return. Return void from method. No operands. Stack:
... [empty].
- ireturn, freturn, lreturn, dreturn, areturn.
Return respectively int, float, long, double and
reference from method, where ireturn is also used to return from
methods of types byte, char and short. No operands.
Stack: ..., value [empty].
mark@bottom.xs4all.nl