Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[dali-dev] Dali naming convention for getter methods

Hi all,

One thing that I've noticed -- and this may be a silly question -- but is there some particular strategy or code style guideline used to determine which API getters start with "get" or not? Example: jpaProject(), jpaFile(), etc, instead of getJpaProject()? This gets really confusing when using code assist, as my default behavior is to type "get" and then look for all the related getters. Of course, I don't see any. I then have to hunt up and down the entire list of methods looking for any methods that may be what I need. This also makes it hard to determine which methods are returning results, versus which are performing an action (Example: PersistentType.dataSource() versus PesistentType.update()). It probably would be less of an issue if this convention was used everywhere, but a lot of times there are getters that start with "get" provided by parent classes, so in the method hierarchy you actually do see both getters that start with "get" and those that don't, which confuses matters even more. Again, this is not a big deal; it just always causes me momentarily confusion. I figured there was a reason, so was just curious why the normal "get" convention is not generally used. :)

Thanks
Tom


Back to the top