[ Pobierz całość w formacie PDF ]
.Comments for private and friendlymembers (see Chapter 5) are ignored and you ll see no output.(However,you can use the -private flag to include private members as well.) Thismakes sense, since only public and protected members are availableoutside the file, which is the client programmer s perspective.However,all class comments are included in the output.The output for the above code is an HTML file that has the same standardformat as all the rest of the Java documentation, so users will becomfortable with the format and can easily navigate your classes.It sworth entering the above code, sending it through javadoc and viewingthe resulting HTML file to see the results.124 Thinking in Java www.BruceEckel.comEmbedded HTMLJavadoc passes HTML commands through to the generated HTMLdocument.This allows you full use of HTML; however, the primarymotive is to let you format code, such as:/**** System.out.println(new Date());**/You can also use HTML just as you would in any other Web document toformat the regular text in your descriptions:/*** You can even insert a list:** Item one* Item two* Item three**/Note that within the documentation comment, asterisks at the beginningof a line are thrown away by javadoc, along with leading spaces.Javadocreformats everything so that it conforms to the standard documentationappearance.Don t use headings such as or as embeddedHTML because javadoc inserts its own headings and yours will interferewith them.All types of comment documentation class, variable, and method cansupport embedded HTML.@see: referring to other classesAll three types of comment documentation (class, variable, and method)can contain @see tags, which allow you to refer to the documentation inother classes.Javadoc will generate HTML with the @see tagshyperlinked to the other documentation.The forms are:@see classnameChapter 2: Everything is an Object 125@see fully-qualified-classname@see fully-qualified-classname#method-nameEach one adds a hyperlinked See Also entry to the generateddocumentation.Javadoc will not check the hyperlinks you give it to makesure they are valid.Class documentation tagsAlong with embedded HTML and @see references, class documentationcan include tags for version information and the author s name.Classdocumentation can also be used for interfaces (see Chapter 8).@versionThis is of the form:@version version-informationin which version-information is any significant information you see fitto include.When the -version flag is placed on the javadoc commandline, the version information will be called out specially in the generatedHTML documentation.@authorThis is of the form:@author author-informationin which author-information is, presumably, your name, but it couldalso include your email address or any other appropriate information.When the -author flag is placed on the javadoc command line, the authorinformation will be called out specially in the generated HTMLdocumentation.You can have multiple author tags for a list of authors, but they must beplaced consecutively.All the author information will be lumped togetherinto a single paragraph in the generated HTML.126 Thinking in Java www.BruceEckel.com@sinceThis tag allows you to indicate the version of this code that began using aparticular feature.You ll see it appearing in the HTML Javadocumentation to indicate what version of the JDK is used.Variable documentation tagsVariable documentation can include only embedded HTML and @seereferences.Method documentation tagsAs well as embedded documentation and @see references, methods allowdocumentation tags for parameters, return values, and exceptions.@paramThis is of the form:@param parameter-name descriptionin which parameter-name is the identifier in the parameter list, anddescription is text that can continue on subsequent lines.Thedescription is considered finished when a new documentation tag isencountered
[ Pobierz całość w formacie PDF ]
-
Menu
- Index
- Irzykowski Karol Słoń wÂśród porcelany
- M. Heindel Astrologia
- Eddings Dav
- Dan Simmons Hyperion
- Kazantzakis Nikos Ostatnie kuszenie Chrystusa (SC
- Ziemia obiecana Reymont
- Dagmara Mliczyńska Hajda 'Programowanie rewitalitalizacji na podstawie Nikiszowca materiał dydaktyczny'
- Dav
- Carroll Jonathan Kosci ksiezyca
- ÂŚw. Faustyna Kowalska DZIENNICZEK DUCHOWY(1)
- zanotowane.pl
- doc.pisz.pl
- pdf.pisz.pl
- hattrickd.pev.pl