getter / setter naming in Eclipse


See where someone had the same problem as you.


The response is that Eclipse (now) does the right thing in generating method

geteMail() // not getEMail()

for field

String eMail;

It’s unfortunate that class java.beans.Introspector’s Javadoc has a reference to

which is a broken link.

I haven’t tracked down a definitive statement of how Javabeans should handle a field name like “eMail”.


will convert method name geteMail() to field name eMail

but will leave method name getEMail() as for field name EMail.

Hence the former getter name is ‘correct’ for field name eMail.

So it might be that it is your other tools, not Eclipse, that are doing ‘the wrong thing’.

The moral is, probably, to ​​avoid any field names that start lower-case upper-case?


The University of Dundee is a registered Scottish Charity, No: SC015096