[Java]: Optimised code generation to remove invoke interface calls.