java --Unification of comments

A note on unifying java comments when using Doxygen

1. Header comment

test.java


/*
 *
 * @Title      : ${PACKAGE_NAME}
 * @Description:
 * @company    : ** corp
 * @history    : Created by ${USER} on ${DATE}.
 *
 */
public class ${PACKAGE_NAME} {
    /* constractor */
    ${PACKAGE_NAME} () {
        ...
    }
    ...
}

Put the above in the template and enter it automatically when creating the class. Enter the class name in @Title Describe the outline of the class in @Description Describe the creator or company in @company Enter the date of creation or modification in @history

2 Method comment

test.java


/**
 *  @brief  This function is called by the application to add ...
 *  @param len  Length
 *  @param data Data
 *  @param src  Src
 *  @return     result
 *  @since      ticket no.
 */
private bool storeData(int len, int data, int src)
{
    ...
}

The method is outlined in @brief Describes the details of the @param parameter. It is easy to understand in the post-process if you describe what kind of data and what range it is. @return Enter the return value. This is also easy to understand if you describe the type and range of data.

Register it in the comment generation tool so that you can fill it out automatically. Personally, Visual Studio Code is good.

3 Property comment

Instead of writing line by line, write in execution units.

test.java


 // @summary The Name property ...

4 Summary

For me, leave the comments so loose The rest is a group that manages with Doxygen settings

Recommended Posts

java --Unification of comments
[Java] Overview of Java
Expired collection of java
Predicted Features of Java
NIO.2 review of java
Comments in Java source
History of Java annotation
java (merits of polymorphism)
NIO review of java
[Java] Three features of Java
Summary of Java support 2018
[Java] Types of comments and how to write them
About an instance of java
[Java] Beginner's understanding of Servlet-②
[Java] Practice of exception handling [Exception]
[Java11] Stream Summary -Advantages of Stream-
Basics of character operation (java)
[Java] Creation of original annotation
4th day of java learning
How to write java comments
[Java] Beginner's understanding of Servlet-①
Java end of month plusMonths
[Java] Summary of regular expressions
[Java] Summary of operators (operator)
[Java] Implementation of Faistel Network
[Java] Comparator of Collection class
Summary of Java language basics
[Java] Summary of for statements
Summary of Java Math class
Enumeration of all combinations Java
java (inheritance of is-a principle)
Implementation of gzip in java
Advantages and disadvantages of Java
Benefits of Java static method
[Java] Summary of control syntax
Implementation of tri-tree in Java
Summary of java error processing
[Java] Summary of design patterns
[Java] Summary of mathematical operations
[Java] Speed comparison of string concatenation
Think of a Java update strategy
[Java] Delete the elements of List
[For beginners] Summary of java constructor
Various methods of Java String class
Root cause of java framework bugs
About fastqc of Biocontainers and Java
[Java version] The story of serialization
Summary of [Java silver study] package
About Lambda, Stream, LocalDate of Java8
Story of passing Java Gold SE8
Sort a List of Java objects
[Java] Output by FormatStyle of DateTimeFormatter
[Java] Input to stdin of Process
Basic usage of java Optional Part 1
Handling of time zones using Java
[Java EE] Common misunderstanding of @Dependent
Java
[Note] Handling of Java decimal point
[Java] Runtime Data Areas of JVM
List of members added in Java 9
[Java] Judgment of identity and equivalence