If I have a reference to a class and invoke a method on it, and the class or the method is final, my understanding is that the compiler or the JVM would replace the dynamic disp
The JIT-compiler cannot do this, since it is quite common to create proxies for interfaces at runtime, so the JIT-compiler can never be sure that there won't be a dynamic proxy that implements a certain interface.