Questions tagged [javadoc]

Javadoc is an extensible documentation generation system which reads specially formatted comments in Java source code and generates compiled documentation. It is typically used to produce API documentation in the form of HTML web pages.

Javadoc is an extensible documentation generation system which reads specially formatted comments in Java source code and generates compiled documentation. It is typically used to produce API documentation in the form of HTML web pages.

A Javadoc comment starts with /** (an extra star to the normal multi-line comment) and ends with */. It also makes use of tags (starting with @).

Resources

2947 questions
39
votes
6 answers

Warning: Dangling Javadoc comment

Since I updated my Android Studio (2.3.1) and build tools (2.3.1), I'm getting warning, Warning: Dangling Javadoc comment for comments like, /** set name with format, {@Link FORMAT_NAME} **/ setNameText(getFormattedName(FORMAT_NAME)); As you can…
38
votes
3 answers

How to make documentation with NetBeans and Javadoc

I was searching a while, but nothing found. How can i make documentation in NetBeans 7.0.1? My file looks like: /** Class Description of MyClass */ public class ScanReader{ } In my project properties i checked all options with checkbox and nothing…
Piotr Łużecki
  • 1,031
  • 4
  • 17
  • 33
38
votes
2 answers

How to document Java Record parameters?

How is one supposed to document Java Record parameters? I am referring to the parameters that end up becoming constructor parameters, class fields. I tried: /** * @param name the name of the animal * @param age the age of the animal */ public…
Gili
  • 86,244
  • 97
  • 390
  • 689
38
votes
7 answers

Including images in javadocs

I work with a lot of sample test cases that are visual. Is there any convenient way to include them in my Java source and link them in Javadocs, so my IDE can automatically show them while coding (by invoking a javadoc renderer feature in my IDE?) I…
ianpojman
  • 1,743
  • 1
  • 15
  • 20
37
votes
5 answers

How to format code snippet in Javadoc with @ and { symbols inside?

This is what I'm trying to do: /** *
 * {@code
 * @XmlRootElement
 * public final class Page {
 * }
 * }
 * 
*/ I'm expecting it to be formatted like: @XmlRootElement public final class Page { } But I'm…
yegor256
  • 102,010
  • 123
  • 446
  • 597
37
votes
2 answers

How can a method's Javadoc be copied into other method's Javadoc?

I know that there is @inheritDoc, but it's only for methods which override others. I have several classes with many delegate methods (which do not override others). Can their Javadoc be "inherited" (more exactly: copied)? /** here I need the copy of…
java.is.for.desktop
  • 10,748
  • 12
  • 69
  • 103
37
votes
1 answer

What is the meaning of profile (compact1, compact2, compact 3) in Java API documentation?

Recently I've got to know that there are annotations like compact1, compact2, compact3 for some classes, in Java 8 API documentation. Those seem to be called profile, as you can see on the overview page. (See the below images.) The profile,…
ntalbs
  • 28,700
  • 8
  • 66
  • 83
37
votes
2 answers

Allowed HTML tags in Javadoc

The Checkstyle rule JavadocStyle does not allow the tag . According to the docs, the checks were patterned after the checks made by the DocCheck doclet available from Sun. Unfortunately, I have not found DocCheck anywhere. Neither have I found…
Marco Eckstein
  • 4,448
  • 4
  • 37
  • 48
36
votes
5 answers

Code example with annotation in JavaDoc

my JavaDoc doesn't work when I have a code example with an annotation. Any suggestions? /** *
 * public class Demo {
 *    @DemoAnnotation
 *    public void demoMethod() {
 *    }
 * }
 * 
*/…
John
  • 373
  • 1
  • 3
  • 6
35
votes
8 answers

Javadoc in Eclipse failing to recognize packages

Thanks to this thread, I was able to get Javadoc links to work for my Android project within Eclipse on Windows. Specifically, "{@link android.widget.Toast}" is currently converted into a link to…
Ellen Spertus
  • 6,576
  • 9
  • 50
  • 101
35
votes
5 answers

How to get a JavaDoc of a method at run time?

Its easy to get a method Name of a Class at run time BUT How i can get a JavaDoc of a method at run time ? As the following example Our Class that include JavaDoc of our target method public class MyClass { /** * * @param x…
Ahmed Nabil
  • 17,392
  • 11
  • 61
  • 88
35
votes
4 answers

How to generate javadoc documentation with umlauts?

I am trying to generate Java documentation in Eclipse. The source files are UTF-8 encoded and contain some umlauts. The resulting HTML files do not specify an encoding and do not use HTML entities, so the umlauts aren't displayed correctly in any…
Kim Stebel
  • 41,826
  • 12
  • 125
  • 142
34
votes
4 answers

State of the Art for Clojure Documentation Tools

Over the last year or so I've seen various announcements on the Clojure discussion list and other places about tools for documenting Clojure code. These range from full-on literate programming systems like Marginalia, and the tool being used to…
rplevy
  • 5,393
  • 3
  • 32
  • 31
34
votes
6 answers

How to disable Javadoc warnings in Maven Javadoc Plugin?

I'm using the Maven Javadoc Plugin. It outputs warnings as follows: [ERROR] /home/monperrus/spoon/src/main/java/spoon/visitor/CtVisitor.java:144: warning: no @param for How to not display those warnings?
Martin Monperrus
  • 1,845
  • 2
  • 19
  • 28
34
votes
1 answer

Javadoc not generated for Lombok getter and setter

I am having a problem with generating Javadoc for Lombok getters and setters. I have tried both suggestions here. An example field and its text are as follows: /** * Identifier of the client * * @param clientID changes the id of the client …
Egemen
  • 2,178
  • 5
  • 22
  • 32