Win a copy of Head First Android this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

javadoc tags -how does this code generate javadoc?

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?


/**
 
best scout
Posts: 1294
Scala IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 265
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic