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
207
votes
3 answers

How Do I Document Packages in Java?

In the Java APIs I can see Javadoc comments for packages. How/where do I place Javadoc comments to document a package?
jjnguy
  • 136,852
  • 53
  • 295
  • 323
190
votes
3 answers

What is the IntelliJ shortcut key to create a javadoc comment?

In Eclipse, I can press Alt+Shift+J and get a javadoc comment automatically generated with fields, returns, or whatever would be applicable for that specific javadoc comment. I'm assuming that IntelliJ IDEA has this feature. Can anyone tell me if…
josh-cain
  • 4,997
  • 7
  • 35
  • 55
188
votes
2 answers

Is there a javadoc tag for documenting generic type parameters?

I've been looking through the javadoc documentation on Sun's site, trying to find if there's a javadoc tag which can be used to document a class or method's generic type signature. Something like @typeparam, similar to the usual @param, but…
skaffman
  • 398,947
  • 96
  • 818
  • 769
187
votes
18 answers

Get source jar files attached to Eclipse for Maven-managed dependencies

I am using Maven (and the Maven Eclipse Integration) to manage the dependencies for my Java projects in Eclipse. The automatic download feature for JAR files from the Maven repositories is a real time saver. Unfortunately, it does not include API…
Thilo
  • 257,207
  • 101
  • 511
  • 656
176
votes
8 answers

Change Author template in Android Studio

I want to change the automatic author that appears when I create a file in AndroidStudio. /** * Created by a556520 on 16/01/14. */ public class POI { The author takes 'a556520' but I want that appears my name, and not the number of employee. Is…
Shudy
  • 7,806
  • 19
  • 63
  • 98
174
votes
4 answers

Using javadoc for Python documentation

I am currently beginning with Python and I have a strong PHP background and in PHP I have took the habit of using javadoc as a documentation template. I was wondering if javadoc has its place as docstring documentation in Python. What are the…
JF Dion
  • 4,014
  • 2
  • 24
  • 34
167
votes
4 answers

How to generate Javadoc HTML files in Eclipse?

I have written Javadoc style comments like this in my project's code: /** * Description... * * @param ... * @return ..... */ How can I generate Javadoc HTML files using the Eclipse IDE?
JaneNY
  • 2,121
  • 4
  • 17
  • 10
163
votes
4 answers

Android Studio: Javadoc is empty on hover

I have moved from Eclipse to Android Studio recently, and am liking it. However, I miss the Javadoc on hover feature from Eclipse. I followed the instructions here to add the functionality, however, my hovers contain no Javadoc. If I use my…
Doge
  • 6,553
  • 5
  • 24
  • 25
152
votes
11 answers

good example of Javadoc

is there a good example of a source file containing Javadoc? I can find lots of good examples of Javadoc on the internet, I would just like to find out the particular syntax used to create them, and assume I can pore through the source of some…
Jason S
  • 184,598
  • 164
  • 608
  • 970
145
votes
3 answers

How to @link to a Enum Value using Javadoc

Using Javadoc 1.5, I have been unable to create a @link to an Enumeration value. What I would like to do is to create an Enum like this: public enum Planet { /** * MERCURY is a fun place. */ MERCURY, /** * VENUS is more fun. */ VENUS, /** *…
Christer Fahlgren
  • 2,414
  • 2
  • 21
  • 16
144
votes
9 answers

How can I use "<" and ">" in javadoc without formatting?

If I write in a javadoc, it does not appear, because tags have special functions on formatting texts. How can I show this chars in a javadoc?
The Student
  • 27,520
  • 68
  • 161
  • 264
140
votes
14 answers

Simple Getter/Setter comments

What convention do you use to comment getters and setters? This is something I've wondered for quite some time, for instance: /** * (1a) what do you put here? * @param salary (1b) what do you put here? */ public void setSalary(float…
ThaDon
  • 7,826
  • 9
  • 52
  • 84
136
votes
3 answers

How to create multiple levels of indentation in Javadoc?

Suppose, that as part of documenting your code (Javadoc) you want to indicate that the relationships between elements using deep indentation. How can I create a nested list as: some element some other element yet some other element
James Raitsev
  • 92,517
  • 154
  • 335
  • 470
136
votes
5 answers

Usage of @see in JavaDoc?

When do I use @see when dealing with JavaDocs? What is its usage? For example if MethodA calls MethodB then do I have to put @see in MethodB's javadoc and reference MethodA because that is what called it, or do I have to put a reference to MethodB…
Jeff
  • 2,017
  • 3
  • 15
  • 8
134
votes
3 answers

Intellij IDEA show javadoc automatically

When I am coding at Netbeans it autocompletes the code and show Javadocs. However when I am using Intellij IDEA if I click Ctrl+Space I can see the auto-complete and if I click Ctrl+Q I can see the javadoc seperately. Is it possible to see the…
kamaci
  • 72,915
  • 69
  • 228
  • 366