• Post Reply Bookmark Topic Watch Topic
  • New Topic

javadoc tags -how does this code generate javadoc?  RSS feed

 
Sunny Gibbony
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My goal is add javadoc tags so that my java code can be generated and will save time. Does the code below do that? What is the @param and @throws actually do when it is run by the java doc? Are the javadoc tags below a good example to look at?


/**
 
Marco Ehrentreich
best scout
Bartender
Posts: 1294
IntelliJ IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

you'll find an extensive explanation of all tags on the JavaDoc homepage.

Anyway your example surely is a good starting point but there are a lot more information you can put in a JavaDoc comment if you want or need.

Marco
 
Stevi Deter
Ranch Hand
Posts: 265
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Javadoc is a tool for documenting your code. It doesn't generate code itself.

You use the Javadoc annotations in your Java files to associate comments with your classes and methods.

You use the Javadoc tool to generate the actual java documentation, which will be in the format that you see in the Java API.

Some IDEs will help you generate your javadoc comments based off your code. For example, in Eclipse, if you type "/**" and hit return above a method, it'll generate the @params, @throws, and @return statements for you. You'll still need to add the actual content (description of method, any additional details on the params, what the return value means).
[ May 19, 2008: Message edited by: Stevi Deter ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!