Book a Demo

Author Topic: Getters and Setters in Java  (Read 3331 times)

jeffc

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Getters and Setters in Java
« 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

kamil.svoboda

  • EA User
  • **
  • Posts: 42
  • Karma: +0/-0
    • View Profile
Re: Getters and Setters in Java
« Reply #1 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

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Getters and Setters in Java
« Reply #2 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