Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Complete list of special Java comment tags [closed]

Tags:

java

comments

I just found out I can write "{@value}" in the comment of a public static final field to insert the actual field value into the comment. Example:

/** The value of this field is {@value}. */
public static final int someField = 3

In Eclipse, this comment is displayed as "The value of this field is 3". Another trick is to write "{@code some-code}" in order to insert code into a comment.

Is there a complete list of these special comment tags somewhere? I couldn't find one...

like image 532
python dude Avatar asked Nov 05 '10 20:11

python dude


People also ask

How many comment symbols are there in Java?

5 - Comments. Java programs can have two kinds of comments: implementation comments and documentation comments. Implementation comments are those found in C++, which are delimited by /*... */, and //.

How many types of comments do we have in Java?

In Java there are three types of comments: Single-line comments. Multi-line comments. Documentation comments.

What are comments explain 3 types of comments available in Java?

Comments in Java are used to provide some extra information about the code. Single line, multi-line and documentation are the three ways to present the comments in Java.

How do you close comments in Java?

Multi-line comments start with /* and ends with */ . Any text between /* and */ will be ignored by Java.


2 Answers

This should get you started:

  • javadoc - The Java API Documentation Generator: Javadoc tags

Note the -tag option though. Tags are extensible, so there's no such thing as a complete list.

like image 104
Mark Peters Avatar answered Sep 28 '22 18:09

Mark Peters


For Java 12: Documentation Comment Specification for the Standard Doclet

like image 44
Marcono1234 Avatar answered Sep 28 '22 16:09

Marcono1234