Is there anything that will stop java inlining a method?
问题 In certain situations java will "inline" a method body to avoid the overhead of the method call, if the method call becomes a bottleneck. However, I can't find any information about anything that will stop java from doing this. E.g. I can imagine perhaps that if the method is non-static or modifies fields, then this could stop java from inlining the method body. Can all methods be inlined, or are there certain elements of my code that would stop java from inlining a method? Edit: I do not