Javadoc: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
Line 12: Line 12:


=Inheriting an Overridden Method Comments=
=Inheriting an Overridden Method Comments=
When implementing an interface method in an implementation class without providing any javadoc for the overridden method, the overridden method automatically inherits the javadoc of the interface method, with some additional clarifying message to the effect that the documentation was inherited:
[[File:javadocInterfaces1.png]]
However, if the overridden
An overridden method automatically inherits the javadoc of its




If you define javadocs in the subclass they will replace the inherited javadocs, but you can use {@inheritDoc} to include the respective superclass javadoc comments in the subclass javadocs.
If you define javadocs in the subclass they will replace the inherited javadocs, but you can use {@inheritDoc} to include the respective superclass javadoc comments in the subclass javadocs.

Revision as of 16:54, 11 October 2018

Internal

Link to External Content

/**
 * For more details see {@linktourl https://example.com}
 */

Inheriting an Overridden Method Comments

When implementing an interface method in an implementation class without providing any javadoc for the overridden method, the overridden method automatically inherits the javadoc of the interface method, with some additional clarifying message to the effect that the documentation was inherited:

JavadocInterfaces1.png


However, if the overridden

An overridden method automatically inherits the javadoc of its


If you define javadocs in the subclass they will replace the inherited javadocs, but you can use {@inheritDoc} to include the respective superclass javadoc comments in the subclass javadocs.