Javadoc - Estia-advanced-programming/pandora-public GitHub Wiki

Code Documentation

Javadoc is a documentation generation tool in Java that utilizes specially formatted comments to document classes, methods, and other elements of Java code. These comments not only serve as a valuable resource for developers but also enable the automatic generation of comprehensive documentation for Java projects.
The use of Javadoc style comments enhances code readability and facilitates collaboration among developers.

Benefits

1. Documentation Generation:

Javadoc comments enable the automatic generation of documentation in HTML format. This documentation provides insights into the purpose, functionality, and usage of classes and methods, making it an invaluable reference for developers and stakeholders. Currently We haven't introduced Doxygen or other documentation generation tools, but might introduce them during the project

2. Editor Tooltips:

Integrated Development Environments (IDEs) leverage Javadoc comments to generate tooltips that appear when developers hover over a class, method, or parameter. These tooltips offer quick access to relevant information, fostering a more efficient and informed coding experience.

Generic Format of Javadoc Comments

Javadoc comments are denoted by /**... */ and are placed immediately before the declaration of the class, method, or other code elements. Note the double ** after the first /
The generic structure of a Javadoc comment includes the following elements:

/**
 * Description of the class or method.
 * Additional details and usage information.
 *
 * @author Author's name
 * @version Version number
 * @param parameterName Description of the parameter
 * @return Description of the return value (for methods)
 * @throws ExceptionType Description of the exception (if applicable)
 */
  • Description: A concise and informative summary of the class or method's purpose and functionality.
  • Author: The name of the author or contributor.
  • Version: The version number of the class or method.
  • Parameters: Descriptions of parameters for methods, including their names and purposes.
  • Return: Description of the value returned by a method.
  • Throws: Documentation for exceptions that the method may throw.
⚠️ **GitHub.com Fallback** ⚠️