24 */ |
24 */ |
25 |
25 |
26 package jdk.javadoc.doclet; |
26 package jdk.javadoc.doclet; |
27 |
27 |
28 import java.util.Locale; |
28 import java.util.Locale; |
|
29 import java.util.List; |
29 import java.util.Set; |
30 import java.util.Set; |
30 |
31 |
|
32 import javax.lang.model.element.Element; |
31 import javax.lang.model.SourceVersion; |
33 import javax.lang.model.SourceVersion; |
32 |
34 |
33 import jdk.javadoc.internal.doclets.formats.html.HtmlDoclet; |
35 import jdk.javadoc.internal.doclets.formats.html.HtmlDoclet; |
34 |
36 |
35 /** |
37 /** |
36 * This doclet generates HTML-formatted documentation for the specified modules, |
38 * This doclet generates HTML-formatted documentation for the specified modules, |
37 * packages and types. |
39 * packages and types. |
38 * |
40 * |
39 * @see <a href="{@docRoot}/../specs/doc-comment-spec.html"> |
41 * <h2><a id="user-defined-taglets">User-Defined Taglets</a></h2> |
|
42 * |
|
43 * The standard doclet supports user-defined {@link Taglet taglets}, |
|
44 * which can be used to generate customized output for user-defined tags |
|
45 * in documentation comments. |
|
46 * |
|
47 * Taglets invoked by the standard doclet must return strings from |
|
48 * {@link Taglet#toString(List,Element) Taglet.toString} as follows: |
|
49 * |
|
50 * <dl> |
|
51 * <dt> <i>Inline Tags</i> |
|
52 * <dd> The returned string must be |
|
53 * <a href="https://www.w3.org/TR/html52/dom.html#flow-content">flow content</a>, |
|
54 * or any valid fragment of HTML code that may appear in the body of a document. |
|
55 * There may be additional constraints, depending on how the tag is to be |
|
56 * used in a documentation comment: for example, if the tag may be used |
|
57 * within an inline element such as {@code <b>} or {@code <i>}, the taglet |
|
58 * must not return a string containing block tags, like {@code <h3>} or |
|
59 * {@code <p>}. |
|
60 * <dt> <i>Block Tags</i> |
|
61 * <dd> The returned string must be suitable content for a definition list, |
|
62 * or {@code <dl>} element. It will typically be a series of pairs |
|
63 * of {@code <dt>} and {@code <dd>} elements. |
|
64 * </dl> |
|
65 * |
|
66 * @see <a href="{@docRoot}/../specs/javadoc/doc-comment-spec.html"> |
40 * Documentation Comment Specification for the Standard Doclet</a> |
67 * Documentation Comment Specification for the Standard Doclet</a> |
41 */ |
68 */ |
42 public class StandardDoclet implements Doclet { |
69 public class StandardDoclet implements Doclet { |
43 |
70 |
44 private final HtmlDoclet htmlDoclet; |
71 private final HtmlDoclet htmlDoclet; |