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.

130Chapter 5The Sun Microsystems Java Software <str<strong>on</strong>g>Development</str<strong>on</strong>g> Kit@excepti<strong>on</strong> or @throwsOnly valid in the comment for a method or c<strong>on</strong>structor. This tag isfollowed by the name of an excepti<strong>on</strong> class (a descendant ofjava.lang.Excepti<strong>on</strong>) and opti<strong>on</strong>ally by additi<strong>on</strong>al explanatory text.The intent is to list the excepti<strong>on</strong>s that the method throws.@paramOnly valid in the comment for a method or c<strong>on</strong>structor. This tag shouldbe followed by the name of a parameter to the method followed by descriptivetext. This is used to document method and c<strong>on</strong>structor parameters.@returnOnly valid in the comment for a method. 7 This tag is followed bydescriptive text meant to document the return value of the method.@seePopulates a “See Also” secti<strong>on</strong> in the documentati<strong>on</strong> that will providehyperlinks to related c<strong>on</strong>tent. There is a general format for linking to anyURL, but the most comm<strong>on</strong> use is to refer to other elements in the sameJava program. See below for the general format of such links.In additi<strong>on</strong> to these standard at-tags, there are other at-tags that may beembedded in any comment text—either the comment itself or in text that isan argument to a standard at-tag.Such tags are placed within curly braces, for example {@example}, withina Javadoc comment. The <strong>on</strong>e we use the most is the @link tag, which allowsyou to make a reference to another package, class, method, or class member.The general format is the same as that for the @see tag:package_name.class_name#member_or_method_nameAny of these elements is opti<strong>on</strong>al.The embedded at-tags include:@docRootThis tag may be used when embedding HTML anchor or image tags(A or IMG tags) in a Javadoc comment to supply the root part of the7. But not a c<strong>on</strong>structor in this case, because c<strong>on</strong>structors cannot return a value.

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

Saved successfully!

Ooh no, something went wrong!