No more redundant Javadoc

When writing classes, I generally start with defining the private fields with Javadoc comments, then will use Eclipse to generate the public getters and setters. I like to Javadoc each field, but that Javadoc then needs to be repeated two more times (get and set), so I end up with needing to maintain 3 copies of the documentation.

One idea that was proposed was to add a generalised "{@include}" type tag in javadoc that would copy blocks of documentation from other objects. That way the refactoring process could just place a reference to the field documentation when creating getters and setters which wouldn't have to be changed when the field documentation was.

Does this sound like a feature that would make sense for JavaDoc 7? Or is there a reasonable alternative today?

[800 byte] By [whitforda] at [2007-11-26 13:18:48]
# 1

Javadoc currently has no built-in facility for what you're suggesting. This sounds like an issue that could be considered by JSR 260 - Javadoc Tags. This JSR has been stagnant but will restart at some point. One relevant issue on the table is some way to distinguish setters/getters from other methods.

http://www.jcp.org/en/jsr/detail?id=260

-Doug

dhkramera at 2007-7-7 17:44:36 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...