views:

43

answers:

1

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?

A: 

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

karianna