1370 Creating HTML Documentation with javadoc (on CD) (Sri lanka web server)

1370 Creating HTML Documentation with javadoc (on CD) Appendix F Outline F.1 Introduction F.2 Documentation Comments F.3 Documenting Java Source Code F.4 javadoc F.5 Files Produced by javadoc Summary Terminology F.1 Introduction In this appendix, we provide an introduction to the Java 2 Software Developent Kit s javadoc utility for creating HTML files that document Java code. This is the tool used by Sun Microsystems to create the Java API documentation (Fig. F.1). We discuss the special Java comments and tags required by javadocto create documentation based on your source code and how to execute the javadoc tool. For detailed information on javadoc, visit the javadoc home page at java.sun.com/j2se/1.3/docs/tooldocs/javadoc/index.html F.2 Documentation Comments Before HTML files can be generated with the javadoc tool, programmers must insert special comments called documentation comments into their source files. Documentation comments are the only comments recognized by javadoc. Documentation comments begin with /** and end with */. An example of a simple documentation comment is /** Sorts integer array using MySort algorithm */ Like other comments, documentation comments are not translated into bytecodes. Because javadoc is used to create HTML files, documentation comments can contain HTML tags. For example, the documentation comment /** Sorts integer array using MySort algorithm */ which contains the HTML emphasis tags and is valid. In the generated HTML files, MySort will appear as emphasized text (normally italic). As we will see, javadoctags can be inserted into the documentation comments to help javadoc document your source code. These tags which begin with an @ symbol are not HTML tags. F.3 Documenting Java Source Code Figure F.2 presents a modified version of the Time3class from Fig. 8.8 that contains documentation comments. In the text that follows the example, we thoroughly discuss each of the javadoc tags used in the documentation comments. We discuss how to use the javadoc tool to generate HTML documentation from this file in Section F.4.
Note: If you are looking for cheap and reliable webhost to host and run your mysql application check mysql web server services.

Leave a Reply