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
45
votes
2 answers

What is the difference between {@code memberData} and memberData in JavaDoc

What is the difference between {@code memberData} and memberData in JavaDoc
Oh Chin Boon
  • 23,028
  • 51
  • 143
  • 215
45
votes
5 answers

Why does the default IntelliJ default class javadoc comment use non-standard syntax?

Why does the default IntelliJ default class javadoc comment use non-standard syntax? Instead of creating a line with "User: jstauffer" it could create a line with "@author jstauffer". The other lines that it creates (Date and Time) probably don't…
James A. N. Stauffer
  • 2,649
  • 3
  • 22
  • 32
45
votes
4 answers

Any way to auto generate ALL Javadoc comments in Eclipse?

I know that you can press shift+alt+j to insert an appropriate comment template for the current code block, but is there any way to let eclipse just go crazy and do a whole project like this?
Finbarr
  • 31,350
  • 13
  • 63
  • 94
44
votes
3 answers

Javadoc bug: @link can't handle Generics "<>"

Consider a static method in a class, which I have documented it using javadoc: /** * Description here. * * @param names - The parameters of the impression request. * @param ids - An intent object to enrich. * @param prefix - A…
Adam Matan
  • 128,757
  • 147
  • 397
  • 562
44
votes
4 answers

How to write javadoc links?

How do I write links into javadocs? Currently, I have something like: {@link java.lang.Math#sqrt(double) Math.sqrt} to produce the text Math.sqrt that should link to the java.lang.Math.sqrt(double) API, however, all it does is produce the text, no…
masher
  • 3,814
  • 4
  • 31
  • 35
43
votes
3 answers

Javadoc {@inheritDoc} tag class

I would like to use the {@inheritDoc} class to inherit methods from my abstract class. In the documentation for the abstract class, I refer to the abstract class by name. How can I tag this so when the subclass inherits the documentation from the…
LandonSchropp
  • 10,084
  • 22
  • 86
  • 149
42
votes
5 answers

Javadoc "cannot find symbol" error when using Lombok's @Builder annotation

I have a class looking as below : @Data @Builder public class Foo { private String param; /** My custom builder.*/ public static FooBuilder builder(String _param){ return builder().param(_param); } } I get the following…
yunandtidus
  • 3,847
  • 3
  • 29
  • 42
42
votes
2 answers

What is the @linkplain tag used for and how does it differ from @link

I am wondering what exactly is the difference of the JavaDoc tags @link and @linkplain. They both seem to generate the same html code.
kerner1000
  • 3,382
  • 1
  • 37
  • 57
42
votes
5 answers

In Javadocs, how should I write plural forms of singular Objects in tags?

I have a class named Identity. In my javadoc comments I am referencing it as a plural. I can think of two solutions: change the reference to Identities or Identitys. Neither of these feel correct, and I'm wondering if…
maxbfuer
  • 839
  • 2
  • 9
  • 15
42
votes
2 answers

How to use @value tag in javadoc?

I am using a class with private constructor instead of an enum (this is a requirement). And now I am trying to add javadoc tags to document each public static final entity. 1) What is prefered place to put javadoc tags: like ob1 or ob2? 2) Both…
Nikolay Kuznetsov
  • 9,467
  • 12
  • 55
  • 101
42
votes
3 answers

How can I enable javadoc for the Android support library?

When using the Android support library for compatibility and try to view the javadoc for, say, FragmentTransaction, I get the following error because there is no associated javadoc file: android.support.v4.app.FragmentTransaction Note: This element…
Jeff Axelrod
  • 27,676
  • 31
  • 147
  • 246
41
votes
4 answers

Eclipse formatter adds space in empty comment lines

The eclipse code formatter adds a trailing space in each empty Javadoc comment line (see screenshot). The formatter of a colleague is always removing those spaces (and thus producing annoying SVN diffs). He is claiming to use the same formatter…
Elbonian
  • 1,118
  • 2
  • 12
  • 17
41
votes
3 answers

JavaDoc in an Eclipse Android Project

In our Android project, our code is JavaDoc'd and that generates everything properly. However, any reference to the Android API classes/functions results in a JavaDoc error and a link to the relevant information is not generated. Instead we get…
Robert
  • 411
  • 1
  • 4
  • 4
40
votes
4 answers

Can I add JavaDoc to a package easily with Eclipse?

I use javadoc to document my classes and methods. I would like to add some overview information to my packages, too. I like how Eclipse creates a stub of a matching Doc Comment for each class or method once I type /**. Does Eclipse have an…
Hanno Fietz
  • 30,799
  • 47
  • 148
  • 234
40
votes
2 answers

How do I modify the Javadoc when I modify someone else's code?

I am working on someone else's code and making significant modifications. (I am converting it to use a different database than the one he originally used.) How do I indicate in the Javadoc comments that I am not the original author of the code,…
Steph
  • 2,135
  • 6
  • 31
  • 44