13.07.2015 Views

Java™ Application Development on Linux - Dator

Java™ Application Development on Linux - Dator

Java™ Application Development on Linux - Dator

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

5.5 Complete, Up-to-Date Program Documentati<strong>on</strong> Made Easy129Example 5.6 Sample Javadoc comment with at-tags/*** addWait - adds in the given wait time to all the counters;* we could say much more about the method here, but let me say* that we sometimes include HTML tags directly in our comments.* Since Javadoc will run all our text together, we may need: * break tags * or paragraph tags * for spacing and separati<strong>on</strong>.* We also add other HTML tags for emphasis.* You should still try to make the comment readable, though,* for the programmer who is editing the source, not* just for those looking at the formatted Javadoc.* @author John Q. Programmer* @versi<strong>on</strong> $Id$** @param delay - elapsed time, in millisec<strong>on</strong>ds* @throws TakesTooL<strong>on</strong>gExcepti<strong>on</strong>* @returns total time, in millisec<strong>on</strong>ds** @see net.multitool.util.TakesTooL<strong>on</strong>gExcepti<strong>on</strong>, net.multitool.ctrl.Time#count**/public l<strong>on</strong>gaddWait(l<strong>on</strong>g delay){// ...}preceding whitespace or asterisks). The tag’s data is everything from the end ofthe tag to the end of the line (Example 5.6.)Here are the standard at-tags:@authorEverything from the tag to the end of the line is taken as the name of thecode’s author.@deprecatedMarks the method or class deprecated. This tag may be opti<strong>on</strong>ally followedby explanatory text. If present, this text should describe when and why theclass or method was deprecated and what programmers should use instead.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!