Method Invocation in the JVM
Four instructions for Method invocation :
invoke_virtual : call instance method
- Requires an instance to be invoked with.
- Uses late binding (Selection based on object’s class).
invoke_special : call special instance method
- Used for constructors, private methods and super calls.
invoke_static : call static method
- Uses early binding (Selection based on reference type).
invoke_interface : call interface method.
- Has to dynamically locate the method using method tables.