This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

javadoc comments for interfaces AND implementing classes?

 
Leonardo Penha
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Quoted from instructions.html:
"...and javadoc style comments must be used for each element of the public interface of each class."
In case there is a class that implements an interface, and we only write javadoc comments in the interface - but not the class - then the description of the methods in the interface are copied from the interface documentation to the class' documentation.
Is it ok to write javadoc comments only for the interface methods, or do we have to write javadoc comments for the class' methods as well?
 
Michael Morris
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Leonardo,
That depends on the implementing class. If there is something unusual or different, then you should probably javadoc it again in the implementation, otherwise just let the interface's javadoc be used.
Hope this helps,
Michael Morris
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic