author | jjg |
Fri, 27 May 2016 13:06:58 -0700 | |
changeset 38617 | d93a7f64e231 |
parent 25874 | 83c19f00452c |
child 46081 | 7c6d73d10b6b |
permissions | -rw-r--r-- |
10 | 1 |
/* |
23136
aa8958a4c8f4
8035877: javadoc classes are missing @return and @param tags
jjg
parents:
5520
diff
changeset
|
2 |
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. |
10 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
5520 | 7 |
* published by the Free Software Foundation. Oracle designates this |
10 | 8 |
* particular file as subject to the "Classpath" exception as provided |
5520 | 9 |
* by Oracle in the LICENSE file that accompanied this code. |
10 | 10 |
* |
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
* accompanied this code). |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License version |
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
* |
|
5520 | 21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
10 | 24 |
*/ |
25 |
||
26 |
package com.sun.javadoc; |
|
27 |
||
28 |
/** |
|
29 |
* This is an example of a starting class for a doclet, |
|
30 |
* showing the entry-point methods. A starting class must |
|
31 |
* import com.sun.javadoc.* and implement the |
|
23136
aa8958a4c8f4
8035877: javadoc classes are missing @return and @param tags
jjg
parents:
5520
diff
changeset
|
32 |
* {@code start(RootDoc)} method, as described in the |
10 | 33 |
* <a href="package-summary.html#package_description">package |
34 |
* description</a>. If the doclet takes command line options, |
|
23136
aa8958a4c8f4
8035877: javadoc classes are missing @return and @param tags
jjg
parents:
5520
diff
changeset
|
35 |
* it must also implement {@code optionLength} and |
aa8958a4c8f4
8035877: javadoc classes are missing @return and @param tags
jjg
parents:
5520
diff
changeset
|
36 |
* {@code validOptions}. |
10 | 37 |
* |
38 |
* <p> A doclet supporting the language features added since 1.1 |
|
39 |
* (such as generics and annotations) should indicate this |
|
23136
aa8958a4c8f4
8035877: javadoc classes are missing @return and @param tags
jjg
parents:
5520
diff
changeset
|
40 |
* by implementing {@code languageVersion}. In the absence of |
10 | 41 |
* this the doclet should not invoke any of the Doclet API methods |
42 |
* added since 1.5, and |
|
43 |
* the results of several other methods are modified so as |
|
44 |
* to conceal the new constructs (such as type parameters) from |
|
45 |
* the doclet. |
|
46 |
* |
|
47 |
* <p> To start the doclet, pass |
|
23136
aa8958a4c8f4
8035877: javadoc classes are missing @return and @param tags
jjg
parents:
5520
diff
changeset
|
48 |
* {@code -doclet} followed by the fully-qualified |
10 | 49 |
* name of the starting class on the javadoc tool command line. |
38617 | 50 |
* |
51 |
* @deprecated |
|
52 |
* The declarations in this package have been superseded by those |
|
53 |
* in the package {@code jdk.javadoc.doclet}. |
|
54 |
* For more information, see the <i>Migration Guide</i> in the documentation for that package. |
|
10 | 55 |
*/ |
38617 | 56 |
@Deprecated |
10 | 57 |
public abstract class Doclet { |
58 |
||
59 |
/** |
|
60 |
* Generate documentation here. |
|
61 |
* This method is required for all doclets. |
|
62 |
* |
|
23136
aa8958a4c8f4
8035877: javadoc classes are missing @return and @param tags
jjg
parents:
5520
diff
changeset
|
63 |
* @param root Supply the RootDoc to the method. |
10 | 64 |
* @return true on success. |
65 |
*/ |
|
66 |
public static boolean start(RootDoc root) { |
|
67 |
return true; |
|
68 |
} |
|
69 |
||
70 |
/** |
|
71 |
* Check for doclet-added options. Returns the number of |
|
72 |
* arguments you must specify on the command line for the |
|
73 |
* given option. For example, "-d docs" would return 2. |
|
74 |
* <P> |
|
75 |
* This method is required if the doclet contains any options. |
|
76 |
* If this method is missing, Javadoc will print an invalid flag |
|
77 |
* error for every option. |
|
78 |
* |
|
23136
aa8958a4c8f4
8035877: javadoc classes are missing @return and @param tags
jjg
parents:
5520
diff
changeset
|
79 |
* @param option the option for which the number of arguements is returned. |
10 | 80 |
* @return number of arguments on the command line for an option |
81 |
* including the option name itself. Zero return means |
|
82 |
* option not known. Negative value means error occurred. |
|
83 |
*/ |
|
84 |
public static int optionLength(String option) { |
|
85 |
return 0; // default is option unknown |
|
86 |
} |
|
87 |
||
88 |
/** |
|
89 |
* Check that options have the correct arguments. |
|
90 |
* <P> |
|
91 |
* This method is not required, but is recommended, |
|
92 |
* as every option will be considered valid if this method |
|
93 |
* is not present. It will default gracefully (to true) |
|
94 |
* if absent. |
|
95 |
* <P> |
|
96 |
* Printing option related error messages (using the provided |
|
97 |
* DocErrorReporter) is the responsibility of this method. |
|
98 |
* |
|
23136
aa8958a4c8f4
8035877: javadoc classes are missing @return and @param tags
jjg
parents:
5520
diff
changeset
|
99 |
* @param options Supply valid options as an array of Strings. |
aa8958a4c8f4
8035877: javadoc classes are missing @return and @param tags
jjg
parents:
5520
diff
changeset
|
100 |
* @param reporter The DocErrorReporter responsible for these options. |
10 | 101 |
* @return true if the options are valid. |
102 |
*/ |
|
103 |
public static boolean validOptions(String options[][], |
|
104 |
DocErrorReporter reporter) { |
|
105 |
return true; // default is options are valid |
|
106 |
} |
|
107 |
||
108 |
/** |
|
109 |
* Return the version of the Java Programming Language supported |
|
110 |
* by this doclet. |
|
111 |
* <p> |
|
112 |
* This method is required by any doclet supporting a language version |
|
113 |
* newer than 1.1. |
|
114 |
* |
|
115 |
* @return the language version supported by this doclet. |
|
116 |
* @since 1.5 |
|
117 |
*/ |
|
118 |
public static LanguageVersion languageVersion() { |
|
119 |
return LanguageVersion.JAVA_1_1; |
|
120 |
} |
|
121 |
} |