Do no equate final with inlining. The runtime optimizer (Jit or Hotspot) will inline a method based on different factors. final is just one of those factors. However, because a method is final, does not guarantee that it will ever be inlined. It simply makes it a potential candidate for inlining. For example, if a method is 100 lines long and has 100 call sites, the runtime optimizer probably won't inline it even if it's final due to code bloat. However, it would probably inline it if the method is a one-line "getter".
In addition, Hotspot can inline methods that are public and non-final. If Hotspot can determine that a method is not overridden, it might decide to inline it. At a later time, if a class is dynamically loaded that overrides that public method, Hotspot will un-inline the method to ensure the proper behavior of the program.
Peter Haggar
------------------
Senior Software Engineer, IBM
author of:
Practical Java