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
33
votes
4 answers

How to read Javadoc comments by reflection?

I need to know how to read Javadoc comments at run-time (probably by reflection?) Say I have the following function: /** * function that do some thing */ public void myFunc() { //... } At runtime, I can get much information about this…
Muhammad Hewedy
  • 29,102
  • 44
  • 127
  • 219
33
votes
3 answers

Auto-generate Javadoc comments in intelliJ?

Is it possible to auto-generate Javadoc comments for each method in one class in IntelliJ IDEA?
Madan
  • 380
  • 1
  • 4
  • 11
33
votes
4 answers

How to create custom javadoc tags?

How do I create custom javadoc tags such as @pre / @post? I found some links that explain it but I haven't had luck with them. These are some of the…
Carlos
  • 5,405
  • 21
  • 68
  • 114
33
votes
1 answer

What's the correct way to include an email within Javadoc?

I like to put my email address within @author tags and would like them to be clickable mailto: links in the generated Javadoc. How should I go about doing this correctly? /** * I currently do the following, but would like to have my name *…
Ben S
  • 68,394
  • 30
  • 171
  • 212
32
votes
12 answers

How do you read JavaDoc?

What tools/websites do you use to read JavaDocs? I currently use Firefox with 20+ tabs open when working on a J2EE project to have all the documentation available which is not very usable, is eating too much memory and is not searchable. What I…
jrudolph
  • 8,307
  • 4
  • 32
  • 50
32
votes
1 answer

How do I inherit KDoc documentation?

In Java's Javadoc, there is a way to inherit a method's documentation in a subclass using {@inheritDoc} tag. Is there a way to do the same in Kotlin's KDoc? Basically, what I'd like to do is the following: abstract class Base { /** * Some…
hotkey
  • 140,743
  • 39
  • 371
  • 326
32
votes
6 answers

Javadoc template generator

I have a large codebase without Javadoc, and I want to run a program to write a skeleton with the basic Javadoc information (e.g., for each method's parameter write @param...), so I just have to fill the gaps left. Anyone know a good solution for…
Alotor
  • 7,407
  • 12
  • 38
  • 36
31
votes
6 answers

How to compile javadoc from sources in simplest way?

Suppose I have project directory MyProject, under which I have src directory with sources of the program. I want to compile all javadocs from there. What is the simplest command to issue? If I run javadoc -sourcepath ./src -d ./docs I get an…
Suzan Cioc
  • 29,281
  • 63
  • 213
  • 385
31
votes
1 answer

How do I get IntelliJ to give me a warning if I have failed to provide JavaDoc description/annotation for public fields and methods?

Eclipse is able to provide warnings if Javadoc has been unfulfilled for a particular method or field. These fields/methods can be grouped by scope (public, protected, etc). I have found this very useful indeed when preparing my software for…
BigTobster
  • 849
  • 2
  • 11
  • 16
31
votes
5 answers

vs elements when writing Java docs

To represent keywords while writing Java Docs should I use the element or the element? Are there specific situations when one should be preferred over the other?
Geek
  • 26,489
  • 43
  • 149
  • 227
30
votes
9 answers

How to automatically generate comments for getter/setter based on field comments in Eclipse?

I want Eclipse to automatically generate Javadoc comments for my getter and setter methods based on the previously defined comments for the fields. How can I achieve this? Background: A policy in our company is to comment every method and field…
räph
  • 3,634
  • 9
  • 34
  • 41
30
votes
4 answers

Generic type

converted to paragraph tag in Javadoc

I have a Java class with a generic type P. I want to document it in Javadoc. Normally I just do this: /** * ... * @param

the type of publisher */ This shows up fine in actual Javadoc. However, CheckStyle is warning me that I need to document…

David ten Hove
  • 2,748
  • 18
  • 33
30
votes
1 answer

JSON.simple API Javadoc

Is there a Javadoc for JSON.simple?
cp.
  • 1,241
  • 5
  • 15
  • 26
30
votes
2 answers

Add local javadoc to local aar in Android-Studio

Is there a way to attach javadocs, provided in a jar, to a aar library? There is no source code available and both files exist locally (not in a repository). The aar is added through: repositories { flatDir { dirs 'libs' …
Zarokka
  • 3,016
  • 26
  • 20
30
votes
3 answers

JavaDoc style sheets

Is there a JavaDoc style sheet? The default one is pretty ugly.
Sheldon
  • 2,598
  • 10
  • 27
  • 36