Lecture 10: Documentation, Garbage Collection, and Nested Classes/Interfaces

The Java standard APIs are shown in HTML output at . It’s generated from the documentation comments (doc comments). Documentation comments are special comments in the source code that are delimited by the /** . */ delimiters. The JDK contains a tool named javadoc to generate HTML documentation from documentation comments in your source file. The javadoc utility extracts information for the following items Public classes and interfaces Public and protected methods Public and protected fields Packages. | Lecture 10: Documentation, Garbage Collection, and Nested Classes/Interfaces Documentation Comments Overview The Java standard APIs are shown in HTML output at . It’s generated from the documentation comments (doc comments). Documentation comments are special comments in the source code that are delimited by the /** . */ delimiters. The JDK contains a tool named javadoc to generate HTML documentation from documentation comments in your source file. The javadoc utility extracts information for the following items Public classes and interfaces Public and protected methods Public and protected fields Packages Details on the Doc Comments Doc comments star with the three characters /** and continue until the next */. /** * Do what the invoker intends. “Intention” is defined by * an analysis of past behavior as described in ISO 4074-6 */ public void dwim() throws IntentUnknownException; Leading * characters, and their preceding white spaces are ignored The first sentence of the comment is the summary for the identifier. You can use most of the HTML tags in the text formatting or providing cross-reference links to other documentation. Only doc comments that IMMEDIATELY PRECEDE a class/interface, method, or field are processed. If no doc comment is given for an inherited method, the method inherits the doc comments from its supertype If a method inherits doc comments from both a superclass and superinterface, the interface comment are used. Tags in the Doc Comments @see: creates a cross-reference link to other javadoc documentation. It’s used in a “See also” section at the end of the documentation. Qualify the identifier sufficiently. specify class/interface members by using a # before the member name. If a method is overloaded, list its parameters. Specify classes/interfaces with their simple names. If a class/interface is from another package, specify its package name. Examples: @see #getName @see Attr @see | Lecture 10: Documentation, Garbage Collection, and Nested Classes/Interfaces Documentation Comments Overview The Java standard APIs are shown in HTML output at . It’s generated from the documentation comments (doc comments). Documentation comments are special comments in the source code that are delimited by the /** . */ delimiters. The JDK contains a tool named javadoc to generate HTML documentation from documentation comments in your source file. The javadoc utility extracts information for the following items Public classes and interfaces Public and protected methods Public and protected fields Packages Details on the Doc Comments Doc comments star with the three characters /** and continue until the next */. /** * Do what the invoker intends. “Intention” is defined by * an analysis of past behavior as described in ISO 4074-6 */ public void dwim() throws IntentUnknownException; Leading * characters, and their preceding .

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.