2

In Eclipse, there is a optional warning when a private field is accessed from an inner class, saying that a synthetic accessor method will be generated and that performance may be improved by making the field package-private.

Does this synthetic method really incur performance penalty? I thought that accessors are generally inlined at runtime, aren't they?

Mr_and_Mrs_D
  • 32,208
  • 39
  • 178
  • 361
Fixpoint
  • 9,619
  • 17
  • 59
  • 78

1 Answers1

1

See this SO question, in short - not much but it raises some interesting class design points

Community
  • 1
  • 1
Martijn Verburg
  • 3,287
  • 21
  • 26