Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: jeffc on January 29, 2005, 01:34:18 pm

Title: Getters and Setters in Java
Post by: jeffc on January 29, 2005, 01:34:18 pm
I am new to EA, and I am having trouble generating correct getters and setters in Java. I'm following the standard Java naming convention for fields so that they alway begin with a lowercase letter. So if I have a field called "foo", I would expect my getter and setter to be named "getFoo" and "setFoo". When I generate a property from EA, I am gettting "getfoo" and "setfoo".

What am I doing wrong? Is there a way to get the behavior that I expect?

Thanks
-jeff
Title: Re: Getters and Setters in Java
Post by: kamil.svoboda on January 30, 2005, 01:10:46 am
Yes, implicit property name is with lower case (I don't now why...:(  But You can change it in the property dialog - in the Property Details - Name.
Kamil
Title: Re: Getters and Setters in Java
Post by: Eve on January 30, 2005, 01:03:30 pm
There is an option to get the behaviour you are describing.  Look at the "Generation" options page and check "Capitalized Attribute Name for Properties"

Simon