Tom Mutdosch wrote:
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
Hi guys,
I realize that my question may have come off smart-alecy when I
originally asked about the naming convention for getter methods, so my
apologies. I actually was just genuinely curious about the
convention, as I know that eclipse and WTP often utilize conventions
that eventually filter on down to other developers like myself. I
just didn't know if it was as simple as "all the API are essentially
getters, so a 'get' prefix is redundant" or if there were other
factors. I really don't mind; was just interested from a fellow
developer standpoint.
-Tom
_______________________________________________
dali-dev mailing list
dali-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dali-dev